Hi,

I have a Memcache wrapper class with a set of public  static methods for 
getting and setting application-specific key:value pairs. They use a set of 
private static methods defined here:


    private static boolean has(String key) {
        return MemcacheServiceFactory.getMemcacheService().contains(key) && 
get(key).length()>0;
    }
    
    private static String get(String key) {
        try {
            return (String) 
MemcacheServiceFactory.getMemcacheService().get(key);
        } catch (Exception e) { return "";    }
    }
    
    private static void put(String key, String value, int expiry) {
        MemcacheServiceFactory.getMemcacheService().put(key, value, 
Expiration.byDeltaSeconds(expiry));
    }
    
    private static void delete(String key) {
        MemcacheServiceFactory.getMemcacheService().delete(key);
    }

The problem is there is almost no hit rate on my cache. What's wrong with 
the code here?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/KWbuzF6TofYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to