简体   繁体   中英

Difference between in-memory-store and managed-store in mule cache

What are the main differences between in-memory-store and managed-store in mule cache scope and which gives a best performance.

What is the best way to configure caching in global scope?

We are currently using in-memory-store caching. We are always getting issues with memory outage as we are using a server with less HW configurations. We are using mule 3.7v.

Please provide your suggestions to configure cache in optimized way.

We are facing issue with cache expiration with in-memory-store. cache date is not being expunged after expiration time also. But when we use "managed-store" its working as expected. Below is my configuration:

In-memory: This store the data inside system memory. The data stored with In-memory is non-persistent which means in case of API restart or crash, the data been cached will be lost.

Managed-store: This stores the data in a place defined by ListableObjectStore. The data stored with Managed-store is persistent which means in case of API restart or crash, the data been cached will no be lost.

Source (explained in detail with configuration difference): http://www.tutorialsatoz.com/caching-in-mule-cache-scope/

One of my friend clearly explained me this difference as follows:

in-memory cache--> It is a temperoy memory storage area where it will store the data. for example: Consider using a VM component in Mule, the data will be stored in VM in the form of in-memory queue

in the case of Managed store--> we can store the data and use it in later stages. example: object store

mainly cache will store the frequently used data. It will reduce the db or http calls by saving the frequently used data or results in cache scope.

But both are for temporary storage only, means they are valid for that particular session alone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM