Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Allow component cache to use alternative backend #22

Closed
divmain opened this issue Feb 8, 2017 · 3 comments
Closed

Allow component cache to use alternative backend #22

divmain opened this issue Feb 8, 2017 · 3 comments

Comments

@divmain
Copy link
Contributor

divmain commented Feb 8, 2017

Everything is in-memory for now. However, caching is done with simple keys. And once a cached component has been compressed, the values stored are simple strings. This being the case, there's no reason why Redis couldn't be used as a backend.

Several benefits come to mind:

  • TTLs for cache entries become simple to manage
  • you don't risk out-of-memory errors in your Node process for folks caching anything and everything
  • this scales across nodes
  • you could also prime your cache using known keys
@ryan-roemer
Copy link
Member

Or really, any distributed cache service (memcached, ElasticCache, etc.). Should be a pretty simple abstraction layer.

Put another way, I wouldn't tie it to Redis 😉

@divmain divmain mentioned this issue Feb 8, 2017
@divmain
Copy link
Contributor Author

divmain commented Feb 8, 2017

Agreed. I've expanded my thoughts in the description for why Redis provides such great synergy. But you're right - any caching service should be usable. Ideally, the abstraction is agnostic to the storage, i.e. you're only responsible for providing get and set functions that return a Promise.

@divmain
Copy link
Contributor Author

divmain commented Feb 8, 2017

Related to #5. It may be that this issue is invalidated, if we recommend a "real" caching backend for "real" deployments.

@divmain divmain changed the title Allow component cache to use Redis for backend Allow component cache to use alternative backend Feb 14, 2017
This was referenced Feb 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants