Created
February 8, 2011 10:45
-
-
Save edpichler/816261 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppengineMemCacheMap implements IQuoteCache { | |
private Cache cache; | |
public AppengineMemCacheMap() { | |
Map props = new HashMap(); | |
props.put(GCacheFactory.EXPIRATION_DELTA, 60);// seconds | |
try { | |
CacheFactory cacheFactory = CacheManager.getInstance() | |
.getCacheFactory(); | |
cache = cacheFactory.createCache(props); | |
} | |
@Override | |
public void updateQuote(ICodeQuote stock) { | |
cache.put(stock.getCodigo(), stock); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment