rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
Functions
filecache_function.m File Reference

function used for file-caching other function calls. More...

Go to the source code of this file.

Functions

function
varargout = 
filecache_function (funcptr, varargin)
 function used for file-caching other function calls. More...
 

Detailed Description

function used for file-caching other function calls.

Definition in file filecache_function.m.

Function Documentation

function varargout = filecache_function (   funcptr,
  varargin 
)

function used for file-caching other function calls.

If an expensive function

1 [E, F] = myfunction(A,B,C)

is called frequently during a program run, a filecaching can be used, i.e. one calls the function instead as

1 [E, F] = filecache_function(@myfunction,A,B,C);

If the function result exists in the cache, this is loaded, otherwise the function is called, the result saved in the cache and the result returned.

  • The cache-directory is assumed to be in RBMATLABTEMP/cache
  • The cache-directory can be cleared with the function filecache_clear()
Parameters
funcptris the pointer to a function whose calls are to be cached.
vararginis parameter list of the cached function call
Return values
varargoutreturn values of the cached function call

Definition at line 17 of file filecache_function.m.

Here is the call graph for this function:

Here is the caller graph for this function: