Modelcache

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

Purpose

Stores and retrieves models in the model cache.

Synopsis

modelcache(model)
modelcache(model,data)
modelcache(model,data,prediction)
modelcache list %list all cached objects
modelcache clear %manually purge cache
modelcache settings %modify modelcache settings
success = modelcache('setdescription','name','description')
obj = modelcache('get',name) %retrieve object from cache by name
objs = modelcache('getparents',obj) %retrieve object's parents from cache
objs = modelcache('getchildren',obj) %retrieve object's children from cache
list = modelcache('whos') %return whos-style structure of objects
modelcache('deleteitem',{name1,name2,...}) %remove items from cache
modelcache('deletedates',comp,'yyyy-mm-dd') %remove items before/after this date
modelcache('deletedates',comp,'yyyy-mm-dd',comp,'yyyy-mm-dd')

Description

Modelcache stores models and data upon calculation in the analysis interface. See this manual page for more information.

Commands for modelcache:

Retreiving Cache Items and Information

  • list - Display hyperlinked list of model cache.
  • get - Retrieve one object from the cache by its uniquename.
  • getparents - Retrieves all objects linked as "used by" a given object.
  • getchildren - Retrieves all objects linked as "using" a given object.
  • getinfo - Returns cache item informaiton if object is in cache.

Editing Cache

  • settings - Display optionsgui to adjust settings.
  • setdescription - Change description for an existing entry.
  • deleteitem - Remove item(s) specified by name from the cache.
  • deletedates - Remove item(s) > or < a given date (input dir is a string comparison operator ['>','>=','<' or '<='] indicating how to compare to the given date(s). Up to two comparison/date pairs can be given. E.g:
('deletedates','>,'2012-10-08')
('deletedates','>,'2012-10-08','<','2012-10-12')
  • purgecache - Remove old items from cache.
  • clear - Clear entire cache.
  • whos - Returns a "whos"-style structure of all the objects in the cache.
  • reset - Reset the database and all internally stored information.
>> mycache = modelcache('whos')
mycache =
139x1 struct array with fields:
    name
    size
    bytes
    class
    global
    sparse
    complex
    nesting
    persistent
    location

>> info = modelcache('getinfo',mycache(1).name)
info =
           name: 'archarcheologist20090311T144155070_20090311T14415570'
    description: 'arch [75,10]'
         source: []
           type: 'data'
          links: [0x0 struct]
      cachedate: 7.3515e+05
       filename: 'archarcheologist20090311T144155070_20090311T14415570.mat'

Options

options = a structure array with the following fields:

  • cache: [ 'off' | {'on'} ] Turns caching ability on or off.
  • cachefolder: [ ' ' ] Default is Eigenvector home director.
  • project: ['general'] Current project folder for cache.
  • maxindexlength: Maximum number of items in an index file.
  • maxdatasize: [6000^2] Maximum size of data (number or elements) that can be saved.
  • maxage: [90] Maximum number of days to keep items in cache.
  • alertpurgedays: [30] Alert user when oldest purged item is older than this many days.
  • alertpurgeitems: [30] Alert user when this many ITEMS will be purged at once.
  • lineage_date_sort: ['ascend' {'descend'}]How to sort children of lineage leafs.

See Also

evridir