Feature Cache#

The Cache tab in Settings controls the feature cache — a local store of encoded image features that allows the Segmentation tool to skip re-encoding the same regions.

When you encode an image with the Image Encoder, the generated features can be cached so that subsequent sessions load them directly from disk instead of re-computing.

Cache Settings#

Enable / Disable#

Toggle the Cache enable checkbox to turn the feature cache on or off. When disabled, features are not persisted to disk and must be re-encoded each session.

Cache Directory#

The default cache directory is .cache/ under the plugin root. Click Browse to choose a different location. Use Open Folder to inspect the current cache contents in your file manager.

Maximum Size#

A slider (range 100 – 20,480 MB) controls the maximum cache size. The default is 2,048 MB. When the cache exceeds this limit, the plugin automatically removes the oldest cached files to bring usage back within bounds.

Performance Mode#

Choose a performance strategy that affects how cached features are loaded:

  • Balanced (default) – a compromise between speed and memory usage.

  • Fastest – prioritizes loading speed, may use more memory.

  • Low Memory – minimizes memory usage at the cost of slower loading.

Close Behavior#

Check Clear cache when the plugin closes to automatically delete all cached features when Geo-SAM is unloaded. This is enabled by default and helps keep disk usage minimal.

Managing the Cache#

  • Current Usage – displays the total size of files in the cache directory.

  • Clear Cache Now – immediately deletes all cached feature files.

Note

Clearing the cache does not delete the original image features generated by the Image Encoder. It only removes the cached copies used for faster reloading. You can always re-encode images to regenerate features.