{"id":13780062,"url":"https://github.com/idealley/feathers-hooks-rediscache","last_synced_at":"2026-01-18T04:26:50.982Z","repository":{"id":139941108,"uuid":"101288234","full_name":"idealley/feathers-hooks-rediscache","owner":"idealley","description":"Set of caching hooks and routes for feathersjs.","archived":false,"fork":false,"pushed_at":"2020-06-01T01:14:49.000Z","size":2144,"stargazers_count":38,"open_issues_count":23,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-30T12:18:14.216Z","etag":null,"topics":["api","cache","caching-library","feathersjs","hooks","redis","redis-cache","routes"],"latest_commit_sha":null,"homepage":"","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/idealley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","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}},"created_at":"2017-08-24T11:35:31.000Z","updated_at":"2022-10-27T04:07:58.000Z","dependencies_parsed_at":"2024-01-16T14:04:16.837Z","dependency_job_id":"2af25ba7-bd6e-401d-b232-7713f9fc94bd","html_url":"https://github.com/idealley/feathers-hooks-rediscache","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/idealley/feathers-hooks-rediscache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealley%2Ffeathers-hooks-rediscache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealley%2Ffeathers-hooks-rediscache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealley%2Ffeathers-hooks-rediscache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealley%2Ffeathers-hooks-rediscache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idealley","download_url":"https://codeload.github.com/idealley/feathers-hooks-rediscache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealley%2Ffeathers-hooks-rediscache/sbom","scorecard":{"id":481092,"data":{"date":"2025-08-11","repo":{"name":"github.com/idealley/feathers-hooks-rediscache","commit":"43928bdc6148552ee8947a26a8bb177a04cbff82"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 3/21 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"94 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-vvj3-85vf-fgmw","Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-35q2-47q7-3pc3","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-h9rv-jmmf-4pgx","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T16:39:04.056Z","repository_id":139941108,"created_at":"2025-08-19T16:39:04.056Z","updated_at":"2025-08-19T16:39:04.056Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["api","cache","caching-library","feathersjs","hooks","redis","redis-cache","routes"],"created_at":"2024-08-03T18:01:11.962Z","updated_at":"2026-01-18T04:26:50.965Z","avatar_url":"https://github.com/idealley.png","language":"JavaScript","funding_links":[],"categories":["Packages","Plugins"],"sub_categories":["FeathersJS","Caching"],"readme":"# Redis Cache\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/idealley/feathers-hooks-rediscache.svg)](https://greenkeeper.io/)\n[![Build Status](https://travis-ci.org/idealley/feathers-hooks-rediscache.png?branch=master)](https://travis-ci.org/idealley/feathers-hooks-rediscache)\n[![codecov](https://codecov.io/gh/idealley/feathers-hooks-rediscache/branch/master/graph/badge.svg)](https://codecov.io/gh/idealley/feathers-hooks-rediscache)\n\n\u003e Cache any route with redis\n\n## Releases\n* Versions 1.x.x are compatible with Feathersjs 3.x.x\n* Versions 0.x.x are compatible with Feathersjs 2.x.x -\u003e this branch will not be updated anymore\n\n## Installation\n\n### Feathers 3.x.x\n```\nnpm install feathers-hooks-rediscache --save\n```\n\n### Feathers 2.x.x\nIf you do not use nested routes you can install version 1.x.x if not:\n```\n  npm install feathers-hooks-rediscache@0.3.6 --save-exact\n```    \n\n## Purpose\nThe purpose of these hooks is to provide redis caching for APIs endpoints. Using redis is a very good option for clusturing your API. As soon as a request is cached it is available to all the other nodes in the cluster, which is not true for usual in memory cache as each node has its own memory allocated. This means that each node has to cache all requests individually.\n\nEach request to an endpoint can be cached. Route variables and params are cached on a per request base. If a param to call is set to true and then to false two responses will be cached.\n\nThe cache can be purged for an individual route, but also for a group of routes. This is very useful if you have an API endpoint that creates a list of articles, and an endpoint that returns an individual article. If the article is modified, the list of articles should, most likely, be purged as well. This can be done by calling one endpoint.\n\n### Routes exemples\nIn the same fashion if you have many variants of the same endpoint that return similar content based on parameters you can bust the whole group as well:\n\n```js\n'/articles' // list\n'/articles/article' //individual item\n'/articles/article?markdown=true' // variant\n```\n#### Clearing cache\nThese are all listed in a redis list under `group-articles` and can be busted by calling `/cache/clear/group/article` or `/cache/clear/group/articles` it does not matter. All urls keys will be purged.\n\nYou can also purge single cached paths as by doing GET requests on \n```js\n'/cache/clear/single/articles'\n'/cache/clear/single/articles/article'\n'/cache/clear/single/articles/article?markdown=true' // works with query strings too\n```\nIt was meant to be used over **_HTTP_**, not yet tested with sockets.\n\n## Available hooks\nMore details and example use bellow\n\n### Before\n* `redisBeforeHook` - retrives the data from redis\n\n### After\n* `hookCache` - set defaults caching duration, an object can be passed with the duration in seconds\n* `redisAfterHook` - saves to redis\n* `hookRemoveCacheInformation` - removes the cache object from responses (does not clear from Redis)\n\n\n## Documentation\nAdd the different hooks. The order matters (see below). A `cache` object will be added to your response. This is useful as other systems can use this object to purge the cache if needed.\n\nIf the cache object is not needed/wanted it can be removed with the after hook `hookRemoveCacheInformation()`\n\n### Configuration\n#### Redis\nTo configure the redis connection the feathers configuration system can be used.\n```js\n//config/default.json\n{\n  \"host\": \"localhost\",\n  \"port\": 3030,\n  \"redis\": {\n    \"host\": \"my-redis-service.example.com\",\n    \"port\": 1234\n  }\n}\n```\n* if no config is provided, default config from the [redis module](https://github.com/NodeRedis/node_redis) is used\n\n#### Hooks Configuration\nA redisCache object can be added to the default feathers configuration\n\n```js\n//config/default.json\n\n  \"redisCache\" : {\n    \"defaultDuration\": 3600,\n    \"parseNestedRoutes\": true,\n    \"removePathFromCacheKey\": true,\n    \"env\": \"NODE_ENV\"\n  };\n```\n##### defaultDuration\nThe default duration can be configured by passing the duration in seconds to the property `defaultDuration`.\nThis can be overridden at the hook level (see the full example bellow)\n\n##### parseNestedRoutes\nIf your API uses nested routes like `/author/:authorId/book` you should turn on the option `parseNestedRoutes`. Otherwise you could have conflicting cache keys.\n\n##### removePathFromCacheKey\n`removePathFromCacheKey` is an option that is useful when working with content and slugs. If when this option is turned on you can have the following issue. If your routes use IDs then you could have a conflict and the cache might return the wrong value:\n\n```js\n  'user/123'\n  'article/123'\n```\n\nboth items with id `123` would be saved under the same cache key... thus replacing each other and returning one for the other, thus by default the key includes the path to diferenciate them. when working with content you could have an external system busting the cache that is not aware of your API routes. That system would know the slug, but cannot bust the cache as it would have to call `/cache/clear/single/:path/target`, with this option that system can simply call `:target` which would be the slug/alias of the article.\n\n##### env\nThe default environement is production, but it is anoying when running test as the hooks output information to the console. Therefore if you youse this option, you can set `test` as an environement and the hooks will not output anything to the console. if you use `NODE_ENV` it will pick up the `process.env.NODE_ENV` variable. This is useful for CI or CLI.\n\n##### immediateCacheKey\nBy default the redis cache key gets determined in `redisAfterHook` based on the path. However if you're doing a lot of query manipulation you might want to set the cache key before anything else to keep its size as small as possible. You can achieve this by setting `immediateCacheKey: true` what will set the cache key in the `redisBeforeHook`. Then your hooks might look similar to:\n\n```js\n{\n  before: {\n    find: [redisBefore({ immediateCacheKey: true }), someQueryManipulation()]\n  },\n  after: {\n    find: [cache(), redisAfter()]\n  }\n}\n```\n\n\nAvailable routes:\n```js\n// this route is disable as I noticed issues when redis has many keys, \n// I will put it back when I have a more robust solution\n// '/cache/index' // returns an array with all the keys\n'/cache/clear' // clears the whole cache\n'/cache/clear/single/:target' // clears a single route if you want to purge a route with params just adds them target?param=1\n'/cache/clear/group/:target' // clears a group\n```\n\n## Complete Example\n\nHere's an example of a Feathers server that uses `feathers-hooks-rediscache`.\n\n```js\nconst feathers = require('feathers');\nconst rest = require('feathers-rest');\nconst hooks = require('feathers-hooks');\nconst bodyParser = require('body-parser');\nconst errorHandler = require('feathers-errors/handler');\nconst routes = require('feathers-hooks-rediscache').cacheRoutes;\nconst redisClient = require('feathers-hooks-rediscache').redisClient;\n\n// Initialize the application\nconst app = feathers()\n  .configure(rest())\n  .configure(hooks())\n  // configure the redis client\n  .configure(redisClient)\n\n  // Needed for parsing bodies (login)\n  .use(bodyParser.json())\n  .use(bodyParser.urlencoded({ extended: true }))\n  // add the cache routes (endpoints) to the app\n  .use('/cache', routes(app))\n  .use(errorHandler());\n\napp.listen(3030);\n\nconsole.log('Feathers app started on 127.0.0.1:3030');\n```\n\nAdd hooks on the routes that need caching\n```js\n//services/\u003cservice\u003e.hooks.js\n\nconst redisBefore = require('feathers-hooks-rediscache').redisBeforeHook;\nconst redisAfter = require('feathers-hooks-rediscache').redisAfterHook;\nconst cache = require('feathers-hooks-rediscache').hookCache;\n\n\nmodule.exports = {\n  before: {\n    all: [],\n    find: [redisBefore()],\n    get: [redisBefore()],\n    create: [],\n    update: [],\n    patch: [],\n    remove: []\n  },\n\n  after: {\n    all: [],\n    find: [cache({duration: 3600 * 24 * 7}), redisAfter()],\n    get: [cache({duration: 3600 * 24 * 7}), redisAfter()],\n    create: [],\n    update: [],\n    patch: [],\n    remove: []\n  },\n\n  error: {\n    all: [],\n    find: [],\n    get: [],\n    create: [],\n    update: [],\n    patch: [],\n    remove: []\n  }\n};\n```\n* the duration is in seconds and will automatically expire\n* you may just use `cache()` without specifying a duration, any request will be cached for a day or with the global configured value (see configuration above).\n\n## License\n\nCopyright (c) 2018\n\nLicensed under the [MIT license](LICENSE).\n\n## Change log\n### v.1.1\n* Fixes #23. Feathers works slightly differently, now the change is reflected in the hooks. Tests were adapted.\n* Fixes #24. When it can Webpack 4 tries to evaluate code and remove \"dead\" code, therefore a condition testing for the environement was being evaluated, the value was set to the build environement... To bypass that, the hooks consider that they run in production mode. If you want to set a different one add a property `env: \"NODE_ENV\"` to the rediscache object, it will pick up your node environement and pass it to the hooks.  \n### v1.1.0\n* The `/index` path as well as the scan methods have been removed for now. In fact, testing on a Redis instance with more than 30k keys, it might bring down your server. I need to find a better way to return keys, or to search for them. So to prevent any problem I have removed it. (the code is commented out).\n### v1.0.3\n* Webpack 4\n* Dependencies update\n* Loging of info: modification of the console display\n### v1.0.0\n* Compatibility with Feathers 3.x.x\n* Nested routes fix #3\n### v0.3.6\n* Fixed config issue, Now using minified version. Thank you @oppodeldoc\n### v0.3.5\n* Now the ability to parse optional params in nested routes. Thank you @oppodeldoc\n### v0.3.4\n* new scan method that takes params and a Set to make sure keys are unique.\n### v0.3.0\n* introduces a breaking change: `.use('/cache', routes(app))`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidealley%2Ffeathers-hooks-rediscache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidealley%2Ffeathers-hooks-rediscache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidealley%2Ffeathers-hooks-rediscache/lists"}