{"id":17468344,"url":"https://github.com/caching-tools/next-shared-cache","last_synced_at":"2025-05-14T12:11:34.273Z","repository":{"id":195010701,"uuid":"691618040","full_name":"caching-tools/next-shared-cache","owner":"caching-tools","description":"Next.js self-hosting simplified","archived":false,"fork":false,"pushed_at":"2025-05-09T20:46:39.000Z","size":4184,"stargazers_count":474,"open_issues_count":55,"forks_count":33,"subscribers_count":10,"default_branch":"canary","last_synced_at":"2025-05-11T15:28:49.675Z","etag":null,"topics":["cache","isr","nextjs","redis"],"latest_commit_sha":null,"homepage":"https://caching-tools.github.io/next-shared-cache/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caching-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"caching-tools"}},"created_at":"2023-09-14T14:39:25.000Z","updated_at":"2025-05-10T13:20:43.000Z","dependencies_parsed_at":"2024-03-19T12:29:28.015Z","dependency_job_id":"d44055ca-9a1e-46bd-bc94-33fb8a538d5f","html_url":"https://github.com/caching-tools/next-shared-cache","commit_stats":{"total_commits":586,"total_committers":10,"mean_commits":58.6,"dds":0.3976109215017065,"last_synced_commit":"89a8e2f6a0926b4093300a6a2453229f04bed0a8"},"previous_names":["caching-tools/next-shared-cache"],"tags_count":85,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caching-tools%2Fnext-shared-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caching-tools%2Fnext-shared-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caching-tools%2Fnext-shared-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caching-tools%2Fnext-shared-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caching-tools","download_url":"https://codeload.github.com/caching-tools/next-shared-cache/tar.gz/refs/heads/canary","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254140766,"owners_count":22021220,"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":["cache","isr","nextjs","redis"],"created_at":"2024-10-18T15:06:02.770Z","updated_at":"2025-05-14T12:11:34.244Z","avatar_url":"https://github.com/caching-tools.png","language":"TypeScript","readme":"# `@neshca/cache-handler`\n\n[![npm package](https://img.shields.io/npm/v/@neshca/cache-handler/latest.svg)](https://www.npmjs.com/package/@neshca/cache-handler)\n[![Dependencies](https://img.shields.io/npm/dm/@neshca/cache-handler)](https://www.npmjs.com/package/@neshca/cache-handler)\n[![License](https://img.shields.io/npm/l/express.svg)](https://github.com/caching-tools/next-shared-cache/blob/canary/packages/cache-handler/LICENSE)\n\nWelcome to [`@neshca/cache-handler`](./packages/cache-handler/README.md) (pronounced [`/ˈnæʃkʌ/`](http://ipa-reader.xyz/?text=%CB%88n%C3%A6%CA%83k%CA%8C)), a specialized ISR/Data cache API crafted for Next.js applications. This library simplifies configuring shared cache strategies in distributed environments, such as multiple, independent application instances. It offers a flexible and easy-to-integrate solution for custom cache strategies, especially for Redis.\n\n### Features\n\n- **Shared Cache for Distributed Environments**: Perfect for self-hosted deployments with multiple application instances.\n- **Easy Customization**: Provides a straightforward API with pre-configured Handlers.\n- **On-Demand Revalidation**: Simplifies revalidation across all application replicas.\n- **TTL Management**: Automatic cache cleanup to keep storage space efficient.\n- **Support for Next.js Routers**: Full support and one setup for the Pages and the App Router.\n- **`neshCache` Function**: Utilize the [`neshCache` ↗](https://caching-tools.github.io/next-shared-cache/functions/nesh-cache) function to replace `unstable_cache` for more control over caching.\n- **`neshClassicCache` Function**: Use the CacheHandler in the Pages Router to cache the result of expensive operations in the `getServerSideProps` and API routes.\n- **Pre-populate the Cache with Initial Data**: Automatically pre-populate the cache with the initial data when the application starts using the [instrumentation hook ↗](https://caching-tools.github.io/next-shared-cache/usage/populating-cache-on-start).\n\n## Getting Started\n\nEnhance your application's caching with our [Installation and First Steps Guide](https://caching-tools.github.io/next-shared-cache/installation). This guide covers installation, basic configuration, and practical examples for quick integration.\n\n## Examples\n\nExplore the versatility of `@neshca/cache-handler` in our [Examples Section](https://caching-tools.github.io/next-shared-cache/redis) with real-world scenarios. Learn how to build a custom Handler by following [this guide](https://caching-tools.github.io/next-shared-cache/usage/creating-a-custom-handler).\n\n## Requirements\n\n- **Next.js**: 13.5.1 or newer (below 15.0.0).\n- **Node.js**: 18.17.0 or newer.\n\n## Documentation\n\nFor detailed documentation, visit our [Documentation Page](https://caching-tools.github.io/next-shared-cache).\n\n## Contributing\n\nWe welcome contributions! Check out our [Contributing Guide](./docs/contributing/monorepo.md) for more information.\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","funding_links":["https://opencollective.com/caching-tools"],"categories":["TypeScript","🌐 Web Development - Frontend"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaching-tools%2Fnext-shared-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaching-tools%2Fnext-shared-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaching-tools%2Fnext-shared-cache/lists"}