# Frame Cache

The component caches decoded frame data in memory for smooth playback. Configure the cache with:

    // Limit cache to 512 MB
    model->setCacheMemoryLimit(512 * 1024 * 1024);

    // Query the configured limit
    size_t limit = model->cacheMemoryLimit();

    // Pre-load the next 10 frames for smooth animation
    model->preloadFrames(model->currentFrameIndex() + 1, 10);

    // Query current cache usage
    size_t usedBytes = model->cacheCurrentMemoryBytes();

The same cache API is available at the reader level via `ParticleDatasetReader::setCacheMemoryLimit()` and `ParticleDatasetReader::preloadFrames()`.

To explicitly discard all cached frames (e.g. when switching scalar fields at the reader level):

    reader.clearCache();

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...