Ehcache 2.10.5 | Related Documentation | Integrations | Using Ehcache with the Google App Engine | Use Cases
 
Use Cases
Setting up Ehcache as a local cache in front of memcacheg
The idea here is that your caches are set up in a cache hierarchy. Ehcache sits in front and memcacheg behind. Combining the two lets you elegantly work around limitations imposed by Google App Engine. You get the benefits of the speed of Ehcache together with the unlimited size of memcachedg. Ehcache contains the hooks to easily do this. To update memcached, use a CacheEventListener. To search against memcacheg on a local cache miss, use cache.getWithLoader() together with a CacheLoader for memcacheg.
Using memcacheg in Place of a DiskStore
In the CacheEventListener, ensure that when notifyElementEvicted() is called, which it will be when a put exceeds the MemoryStore's capacity, that the key and value are put into memcacheg.
Using Distributed Caching
Configure all notifications in CacheEventListener to proxy through to memcacheg. Any work done by one node can then be shared by all others, with the benefit of local caching of frequently used data.
Using Dynamic Web Content Caching
Google App Engine provides acceleration for files declared static in appengine-web.xml.
For example:
<static-files>
<include path="/**.png" />
<exclude path="/data/**.png" />
</static-files>
You can get acceleration for dynamic files using Ehcache's caching filters as you usually would. See the Ehcache Web Cache User Guide for more information.

Copyright © 2010-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release