{"id":39748409,"url":"https://github.com/sailscastshq/sails-stash","last_synced_at":"2026-02-02T21:53:39.585Z","repository":{"id":221769294,"uuid":"748069339","full_name":"sailscastshq/sails-stash","owner":"sailscastshq","description":"Efficient and intuitive caching for your Sails applications","archived":false,"fork":false,"pushed_at":"2026-01-20T21:39:25.000Z","size":32,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2026-01-28T12:30:29.270Z","etag":null,"topics":["cache","cache-storage","memcache","redis","sails","sails-hook","sails-hook-cache","sailsjs"],"latest_commit_sha":null,"homepage":"https://docs.sailscasts.com/sails-stash","language":"JavaScript","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/sailscastshq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-25T07:56:35.000Z","updated_at":"2026-01-20T21:39:29.000Z","dependencies_parsed_at":"2024-02-10T00:25:54.875Z","dependency_job_id":null,"html_url":"https://github.com/sailscastshq/sails-stash","commit_stats":null,"previous_names":["sailscastshq/sails-stash"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sailscastshq/sails-stash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailscastshq%2Fsails-stash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailscastshq%2Fsails-stash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailscastshq%2Fsails-stash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailscastshq%2Fsails-stash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sailscastshq","download_url":"https://codeload.github.com/sailscastshq/sails-stash/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailscastshq%2Fsails-stash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29021031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T18:51:31.335Z","status":"ssl_error","status_checked_at":"2026-02-02T18:49:20.777Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cache","cache-storage","memcache","redis","sails","sails-hook","sails-hook-cache","sailsjs"],"created_at":"2026-01-18T11:23:21.325Z","updated_at":"2026-02-02T21:53:39.565Z","avatar_url":"https://github.com/sailscastshq.png","language":"JavaScript","funding_links":["https://github.com/sponsors/DominusKelvin"],"categories":[],"sub_categories":[],"readme":"# Sails Stash\n\nWith Sails Stash, you can easily implement efficient caching for your Sails applications, enhancing performance and scalability without the need for complex setup.\n\nSails Stash integrates seamlessly with your Sails project, providing a straightforward way to cache data. It works out of the box with an in-memory store for development, and can be easily configured to use Redis for production environments. By leveraging caching, you can optimize the retrieval of frequently accessed data, reducing database load and improving overall application performance.\n\n## Features\n\n- Seamless integration with Sails projects\n- **Zero-config memory store** for development (no Redis required!)\n- Optional Redis support for production environments\n- Improved performance and scalability\n- Simple setup and usage\n\n## Installation\n\nYou can install Sails Stash via npm:\n\n```sh\nnpm i sails-stash\n```\n\n## Usage\n\nSails Stash works out of the box with **no configuration required**. It uses an in-memory store by default, perfect for development:\n\n```js\n// Works immediately after installation!\nawait sails.cache.fetch(\n  'posts',\n  async function () {\n    return await Post.find()\n  },\n  6000,\n)\n```\n\n## Using Redis for Production\n\nWhen you're ready to deploy to production, you can optionally switch to Redis for persistent, distributed caching.\n\n### 1. Install the Redis adapter\n\n```sh\nnpm i sails-redis\n```\n\n### 2. Setup the datastore\n\n```js\n// config/datastores.js\nmodule.exports.datastores = {\n  // ... other datastores\n\n  cache: {\n    adapter: 'sails-redis',\n    url: process.env.REDIS_URL,\n  },\n}\n```\n\n### 3. Configure Sails Stash to use Redis\n\n```js\n// config/local.js or config/env/production.js\nmodule.exports = {\n  cachestores: {\n    default: {\n      store: 'redis',\n      datastore: 'cache',\n    },\n  },\n}\n```\n\nThat's it! Your application will now use Redis for caching in production while still using the memory store in development.\n\nCheck out the [documentation](https://docs.sailscasts.com/stash) for more ways to setup and use Sails Stash.\n\n## Contributing\n\nIf you're interested in contributing to Sails Content, please read our [contributing guide](https://github.com/sailscastshq/sails-stash/blob/develop/.github/CONTRIBUTING.md).\n\n## Sponsors\n\nIf you'd like to become a sponsor, check out [DominusKelvin](https://github.com/sponsors/DominusKelvin) sponsor page and tiers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsailscastshq%2Fsails-stash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsailscastshq%2Fsails-stash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsailscastshq%2Fsails-stash/lists"}