Cache

Can archive and unarchive variables in your workspace into a folder Archived_Matlab_Variables in the specified drive.

您现在正在关注此提交

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

引用格式

Tom (2026). Cache (https://ww2.mathworks.cn/matlabcentral/fileexchange/183330-cache), MATLAB Central File Exchange. 检索时间: .

一般信息

MATLAB 版本兼容性

  • 兼容 R2014b 到 R2025b 的版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
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