{"id":25687182,"url":"https://github.com/holyshared/cachemanager","last_synced_at":"2025-06-18T00:37:51.134Z","repository":{"id":1972274,"uuid":"2903584","full_name":"holyshared/CacheManager","owner":"holyshared","description":"Cash API which uses localStorage and sessionStorage is offered.","archived":false,"fork":false,"pushed_at":"2011-12-04T03:20:21.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-15T06:45:03.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/holyshared.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-03T06:09:17.000Z","updated_at":"2016-03-18T16:21:22.000Z","dependencies_parsed_at":"2022-09-01T03:13:01.865Z","dependency_job_id":null,"html_url":"https://github.com/holyshared/CacheManager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/holyshared/CacheManager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holyshared%2FCacheManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holyshared%2FCacheManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holyshared%2FCacheManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holyshared%2FCacheManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holyshared","download_url":"https://codeload.github.com/holyshared/CacheManager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holyshared%2FCacheManager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260463908,"owners_count":23013389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-24T20:08:19.558Z","updated_at":"2025-06-18T00:37:46.089Z","avatar_url":"https://github.com/holyshared.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nCacheManager\n============================================\n\nThis library offers the cash function which uses localStorage newly added by HTML5, and sessionStorage.  \nCache can be used in very easy code.\n\nHow to use\n--------------------------------------------\n\nCacheManager is a cache class which can specify the storage to be used.  \nThe storage which can be used is as follows.\n\n### Storage type\n\n* local - **localStorage** is used.\n* session - **sessionStorage** is used.\n* hash - storage which uses hash is used.\n\n\n### CacheManager\n\nAcquisition of cache and cache can be used in a simple form as follows.  \n\nA **set** method is used for cacheing.  \nThe argument is a milli second about the key of cache, the contents to cache, and the maintenance period of cache, and it makes it into turn.\n\n\tvar user = {\n\t\tname: 'foo',\n\t\tage: 28\n\t};\n\t\n\tvar cache = new CacheManager('hash');\n\t\n\tcache.set(user.name, user, 1 * 60 * 60 * 1000);\n\nConversely, a **get** method is used for acquiring the cached contents.  \nThe get method which uses the following method for acquiring the information on cache returns a **CacheManager.CacheContent** object.  \n\n\tvar cache = cache.get(user.name);\n\n#### CacheManager.CacheContent\n\n* getKey - The key of cache is acquired. \n* getStorage - The used storage is acquired. \n* getLimit - The term of validity of cache is acquired by a time stamp.\n* getContent - The cached contents are acquired.\n* isLimit - true is returned when the term of validity of cash has passed. \n* destroy - Cache is destory. \n\nScreenshot\n--------------------------------------------\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholyshared%2Fcachemanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholyshared%2Fcachemanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholyshared%2Fcachemanager/lists"}