Skip to content

Instantly share code, notes, and snippets.

@nekman
Created September 5, 2012 07:36
Show Gist options
  • Select an option

  • Save nekman/3632689 to your computer and use it in GitHub Desktop.

Select an option

Save nekman/3632689 to your computer and use it in GitHub Desktop.
package se.labs.cache;
/**
*
* @author ne
*
* @param <T> The item to cache
*/
public interface ItemCache<T> {
/**
*
* @return The cached item
*/
T getItem();
/**
*
* @return {@code true} if reload is needed
*/
boolean isReloadNeeded();
/**
* Forces the cache to reload next time it is called
*/
void invalidate();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment