Hi devs, i think it is better we do $subject for Synapse . There is already a cache implementation for synapse which store and manage endpoints, remote entries ,etc. However the problem is all cache related functions are currently done in Synapse configuration and Registry,etc modules, which is not scalable (and difficult to maintain). I suggest , we separate the cache functionality into a different module.IMO that would allow us to to extend current cache functionality as well (ie:- prefetch and cache certain entries at startup for possible performance gain ,etc). API i am suggesting has the following, *Cache <Interface>* #insert(String key,Cacheable cachedObject,CacheConstraint constraint); #insert(String key,Cacheable cachedObject); #Cacheable getCachedObject(String key); #long getGlobalCacheDuration(); * Cacheable <interface>* #Object getValue(); #String getKey(); #boolean isExpired(); #clearCache(); #long getVersion(); #long getExpiryTime(); .... et*c *(i think we could easily extend current Synapse Entry class [which is the object currently used for cache] to implement Cacheable interface ) *
CacheConstraint* *<interface>* boolean evaluate(Cacheable cachedObj) We could also include a cache.xml construct to configure this cache at startup (ie:-cache duration , cache providers , prefetching params , etc) . Really appreciate thoughts of you all , regarding this. thnx in advance. Regards, Udayanga -- *Udayanga Wickramasinghe* Software Engineer; WSO2 Inc.; http://wso2.com, *email: **udaya...@wso2.com* <udayan...@wso2.com>* cell: +94 (77) 983-4365 blog: **http://udayangawiki.blogspot.com*<http://udayangawiki.blogspot.com/> * twitter: **http://twitter.com/udayanga_wick*<http://twitter.com/udayanga_wick> * *