cachingmulepersistent-object-store

Purpose of Custom cache mule


Mule got inbuild object stores to cache data, But what is the purpose of using custom object stores under caching strategies? If possible, Please mention a usecase.


Solution

  • Custom object stores are useful when you want to use a custom persistence mechanism for your ObjectStore's

    By default Mule provides two implementations, in-memory and a file based persistent store.

    One possible use-case is, if you use Enterprise Edition have clustering enabled, you also have the ability to share these stores across multiple Mule nodes. However if you do not use EE or clustering but still want to share data between multiple Mule's, then you will need to use a persistent object store that can be shared across multiple mule nodes.

    The ObjectStore interface has many implementations so you can choose a persistence mechanism that best suits you. Examples include Redis, Ehcache, Mongo, Cassandra, JDBC. More on this here:http://java.dzone.com/articles/synchronizing-data-across-mule