apigee / apigee-access

The "apigee-extensions" module for Node.js, which lets Node.js apps access Apigee-specific information
MIT License
6 stars 3 forks source link

Support cache ttl in standalone mode #9

Open Faklusha opened 8 years ago

Faklusha commented 8 years ago

Hello,

I'm using the cache API via "apigee-access".

I found a problem that in standalone mode the 'ttl' doesn't work. I see in sources of "apigee-access" that for standalone mode the simple object is used as a data storage. It is a cause why cache 'ttl' doesn't work. Is it possible to support 'ttl' for standalone mode? May be to use 'volos-cache-memory' in standalone mode instead of simple object?

Thank you, Yuliana Sukonka

confuser commented 8 years ago

@theganyo Could this be looked into? We're having a few unit tests failing due to this.

theganyo commented 8 years ago

Could you potentially just use volos-cache-apigee? It has exactly what you're looking for: A "fallback" configuration option to automatically fallback to another cache (eg. volos-cache-memory).

(see also: https://github.com/apigee-127/volos/blob/master/cache/apigee/lib/cache.js#L32)