Cache

Version 1.1.0 (56.9 KB) by Tom
Can archive and unarchive variables in your workspace into a folder Archived_Matlab_Variables in the specified drive.
5 Downloads
Updated 3 Apr 2026

View License

Description
Cache is a lightweight MATLAB addon for efficiently archiving and restoring workspace variables.
Cache.archive saves a specified variable into a compressed archive (Archived_Matlab_Variables.zip) and removes it from the workspace, allowing you to offload large data while keeping it stored.
Cache.unarchive restores the variable into the caller workspace and removes it from the archive.
Additional tools include Cache.list to view archived variables and Cache.clean to clear the archive and free space.
Syntax
Cache.archive(var) % uses default C: drive
Cache.archive(var, drive) % drive optional (e.g. 'C', 'D', or full path)
Cache.unarchive('varName') % uses default C: drive
Cache.unarchive('varName', drive) % varName must be string
Cache.list() % lists archived variables (C: drive)
Cache.list(drive) % lists variables in specified drive
Cache.clean() % clears archive (C: drive)
Cache.clean(drive) % clears archive in specified drive

Cite As

Tom (2026). Cache (https://www.mathworks.com/matlabcentral/fileexchange/183330-cache), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2025b
Compatible with R2014b to R2025b
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.1.0

Added Cache.list and Cache.clean which list the archived variables in specified drive, and clears all the archived variables in specified drive respectively. Also updated archive and unarchive logic.

1.0.5

Added image to description.

1.0.4

More clarity in the syntax example, new name

1.0.3

Error fixed when zipping Archived_Matlab_Variables

1.0.2