001package io.ebean.cache; 002 003/** 004 * Defines method for constructing caches for beans and queries. 005 */ 006public interface ServerCacheFactory { 007 008 /** 009 * Create the cache for the given type with options. 010 */ 011 ServerCache createCache(ServerCacheConfig config); 012 013 /** 014 * Return a ServerCacheNotify that we will send ServerCacheNotification events to. 015 * <p> 016 * This is used if a ServerCacheNotifyPlugin is not supplied. 017 * </p> 018 * 019 * @param listener The listener that should be used to process the notification events. 020 */ 021 ServerCacheNotify createCacheNotify(ServerCacheNotify listener); 022}