{"id":19170125,"url":"https://github.com/waridrox/caching-lib","last_synced_at":"2026-06-19T13:32:27.705Z","repository":{"id":57685266,"uuid":"451797238","full_name":"waridrox/caching-lib","owner":"waridrox","description":"Tested caching library","archived":false,"fork":false,"pushed_at":"2022-05-10T16:50:46.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-13T13:34:56.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/caching-library","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/waridrox.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":"2022-01-25T08:35:29.000Z","updated_at":"2022-05-10T16:54:48.000Z","dependencies_parsed_at":"2022-09-13T11:11:22.427Z","dependency_job_id":null,"html_url":"https://github.com/waridrox/caching-lib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/waridrox/caching-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waridrox%2Fcaching-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waridrox%2Fcaching-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waridrox%2Fcaching-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waridrox%2Fcaching-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waridrox","download_url":"https://codeload.github.com/waridrox/caching-lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waridrox%2Fcaching-lib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34534274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-11-09T09:53:09.262Z","updated_at":"2026-06-19T13:32:27.680Z","avatar_url":"https://github.com/waridrox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# caching-library\n\nImplementation of cache managed via eviction policies like FIFO, LRU and LIFO.\n\n* **FIFO**: First In First Out, the first value in the cache is replaced.\n* **LRU**: Last Recently Used, the last recently used value cached is replaced.\n* **LIFO**: Last In First Out, the last value in the cache is replaced.\n\n## Usage\n\n```js\nconst Caches = require('caches')\n\n//To create a cache using a specific eviction policy\nconst lru = new Caches.lru()\nconst lifo = new Caches.lifo()\nconst fifo = new Caches.fifo()\n\n```\n\n## Functions\n\n```js\n\n//Methods\nget (key) //Get the value from the cache with the specific key\nset (key, value) //Sets the key and the value pair in the cache if it doesn't exist\nhas (key) //checks if the value for the given key exists in the cache\nclear() //clears the cache \ndel(key) //delete the value for the given key\nsize() //get the size of the cache\nkeys() //get all the keys that exist in the cache\nvalues() //get all the values that exist in the cache\n\n```\n\n## For Running Tests\n```bash\nnpm test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaridrox%2Fcaching-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaridrox%2Fcaching-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaridrox%2Fcaching-lib/lists"}