Hi, I knew that we have the following different types of caches in the apigee edge.
I believe, all the above types comes under level-1 cache for apigee. Correct me if I'm wrong. Is there anything we have like level-2 cache in apigee edge?
If yes, what are the ways to implement it. Do we have any documents or samples for the same?
How we can clear cache(level-1,2) on specific time? Please help me understanding this to implement it. Thanks!
Hi @Swapna, you are right, these are level-1 caches. Apigee does provide support for level-2 cache via its KVMs (Key Value Map). KVMs leverage the underlying Cassandra datastore. This is where you can store/cache information for specific scenarios such as lookup codes, access tokens etc. KVMs can be scoped to different levels such as Org, Environment & Proxy. You can use the OOTB KVM Policy to access/update KVMs. There is a Management API that you an use to create/manage/delete these KVMs. Hope this helps.
"Apigee does provide support for level-2 cache via its KVMs (Key Value Map)"
@Prithpal Bhogill - I wouldn't mix KVM and cache concepts. Level-2 cache is not KVM - yes it may be stored in the same persistent storage. KVM is for persistent data in key/value form. Caches are for transient data that may be invalidated at any time. KVM data will not expire.
Enabling second.level.cache.enabled flag in cache.properties on MPs will cache your data in L2 which is enabled by default.
Check this http://community.apigee.com/questions/2584/cache-details-says-persistentfalse.html.
If you are on on-perm you can check that on your Mps and cache keyspace in cassandra else get in touch with support .
Thanks everyone for your answers.
I have attached the adding cache for my organization. Please go through it and let me know is this the process to clear the cache on specific time/interval or is there any other way? Thanks!
This looks right. Optionally you can also clear cache using Rest APIs like what you will find here . In this case you have to call it externally from a cron job or something similar. But right out of the gate what you have configured looks good.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |