All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.objectify.impl.CacheControlImpl Maven / Gradle / Ivy

Go to download

*** 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();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy