# Cache & Persist

{% hint style="info" %}
cache persist 명령 넣으면 내부에 어떻게 되는지,

cache = persist(mem)임, 완전히 동일.

이후 persist할 때 sc의 persistentRdds에 추가하고, 나중에 computation할때 값을 참조함

unpersist할 때는 blockmanager에서 제거하고, persistentRdd에서 뺀 후 listenerBus에 다 지우라고 명
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jinhoko.gitbook.io/apache-spark-assembly/core-execution-related/untitled/cache-and-persist.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
