Class PdoCache

  • All Implemented Interfaces:
    org.wurbelizer.wurblet.Wurblet

    public class PdoCache
    extends DbModelWurblet
    (@wurblet) Generate code for setting up a PdoCache for an entity.

    usage:
    @wurblet <tag> PdoCache [--cache=<classname>] [--secure] [--public] [--preload] [--mutable] [--noreg] [--udk] [--bounded] [--strategy=LRU|LFU|FORGET] [--maxsize=<n>] [--keepquota=<p>] [--configure=<method>] [index1] [index2] ...

    arguments:

    • --cache=<classname>: sets the cache-class. Defaults to PdoCache.
    • --secure: if cache must check read permission for each access (default is no check).
    • --public: makes the cache and indexes public (default is private).
    • --preload: the first access will load all entities at once.
    • --mutable: generates a non-shared cache, i.e. mutable PDOs (by default a shared readonly cache is generated).
    • --noreg: will not register the cache globally (default is to use the factory).
    • --udk: add index for the unique domain key.
    • --bounded: creates List<? extends T> for selectAllCached instead of List<T>.
    • --strategy=LRU|LFU|FORGET: the caching strategy (default is FORGET).
    • --maxsize=<n>: the cache size (if not preloaded).
    • --keepquota=<p>: percentage of entries to keep when applying caching strategy. Default is 50.
    • --configure=<method>: an optional method to further configure the cache.
    • --index<n>: additional unique indexes. By default, only the ID-index will be created.
    For more options, see DbModelWurblet.
    • Constructor Detail

      • PdoCache

        public PdoCache()
    • Method Detail

      • run

        public void run()
                 throws org.wurbelizer.wurbel.WurbelException
        Specified by:
        run in interface org.wurbelizer.wurblet.Wurblet
        Overrides:
        run in class DbModelWurblet
        Throws:
        org.wurbelizer.wurbel.WurbelException