Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
What distinguishes cache() from persist() in Spark?
cache()
persist()
A
persist() allows specifying storage levels, unlike cache().
B
cache() saves DataFrames in memory only, while persist() also uses disk.
C
The default storage level for both cache() and persist() is MEMORY_ONLY.
MEMORY_ONLY
D
DataFrames cached with cache() cannot be unpersisted, but those with persist() can.
E
Use cache() for short-term and persist() for long-term DataFrame persistence.