Class OptInCaching

  • All Implemented Interfaces:
    Serializable, BehaviorFactory, ComponentFactory

    public class OptInCaching
    extends AbstractBehaviorFactory
    Behavior that turns off Caching behavior by default.

    Example:

                    import org.picocontainer.*;
                    import static org.picocontainer.Characteristics.*;
     
                    MutablePicoContainer mpc = new PicoBuilder().withBehaviors(new OptInCaching()).build();
                    mpc.addComponent(Map.class, HashMap.class) //Multiple Instances, no Caching.
                    mpc.as(CACHE).addComponent(Set.class, HashSet.class) //Single Cached Instance.          
     
    See Also:
    Serialized Form