Skip to content

Instantly share code, notes, and snippets.

@nekman
Created September 6, 2012 06:51
Show Gist options
  • Select an option

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

Select an option

Save nekman/3652267 to your computer and use it in GitHub Desktop.
package se.labs.cache;
/**
*
* @author ne
*
*/
public class ItemCacheFactory {
/**
*
* @param cacheLoader
* @param secondsBetweenReload
* @return
*/
public static <T> ItemCache<T> create(final ItemCacheLoader<T> cacheLoader, final int secondsBetweenReload) {
return new ItemCacheImpl<T>(cacheLoader, secondsBetweenReload);
}
/**
*
* @param cacheLoader
* @return
*/
public static <T> ItemCache<T> create(final ItemCacheLoader<T> cacheLoader) {
return create(cacheLoader, 600);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment