java - Google Guava Cache On App Engine -


does know if there reasons not use google guava cache library on google app engine.

https://code.google.com/p/guava-libraries/wiki/cachesexplained

particularly using eviction listener. concern cache isn't going replicated across instances.

use case creating cache thusly:

loadingcache<key, graph> graphs = cachebuilder.newbuilder()        .maximumsize(1000)        .expireafterwrite(10, timeunit.minutes)        .removallistener(my_listener)        .build(); 

on post http servlet, using cache later posts, , taking action on removal. i'm concerned there nuance way app engine handles cache, , how there no mention of using eviction listener in app engine docs: https://cloud.google.com/appengine/docs/java/memcache/ vs way done in guava docs.

update:

from testing looks google guava cache not work on gae - , cache gets evicted @ end of transaction (30 seconds or so)

thanks in advance.

well problem caches stored on local memory, keep in mind gae instances created , destroyed time , that's there no guarantee requests user served same instance.

unless can backup cache shared resource (like memcache or datastore) out of luck.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -