Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function varargout = cached(cache_filepath, f, varargin )
- if exist(cache_filepath, 'file') == 2
- load(cache_filepath, 'varargout');
- else
- [varargout{1:nargout}] = f( varargin{:} );
- save(cache_filepath, 'varargout');
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement