Modelcache: Difference between revisions
Jump to navigation
Jump to search
imported>Scott |
imported>Scott |
||
Line 4: | Line 4: | ||
===Synopsis=== | ===Synopsis=== | ||
: modelcache(model) | : modelcache(model) | ||
: modelcache(model,data) | : modelcache(model,data) | ||
Line 13: | Line 12: | ||
: success = modelcache('setdescription','name','description') | : success = modelcache('setdescription','name','description') | ||
: obj = modelcache('get',name) %retrieve object from cache by name | : 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 | : 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=== | ===Description=== |
Revision as of 11:20, 13 June 2013
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.
- 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.
- 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.