com.googlecode.objectify.impl.CacheControlImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of objectify Show documentation
Show all versions of objectify Show documentation
*** THIS VERSION UPLOADED FOR USE WITH CEDAR-COMMON, TO AVOID DEPENDENCIES ON GOOGLE CODE-BASED MAVEN REPOSITORIES. *** The simplest convenient interface to the Google App Engine datastore
The newest version!
package com.googlecode.objectify.impl;
import com.google.appengine.api.datastore.Key;
import com.googlecode.objectify.ObjectifyFactory;
import com.googlecode.objectify.cache.CacheControl;
/**
* Implements CacheControl for Objectify
*/
public class CacheControlImpl implements CacheControl
{
/** */
ObjectifyFactory fact;
/** */
public CacheControlImpl(ObjectifyFactory fact)
{
this.fact = fact;
}
/** */
@Override
public Integer getExpirySeconds(Key key)
{
return fact.getMetadata(key).getCacheExpirySeconds();
}
}