RDD.
cache
Persist this RDD with the default storage level (MEMORY_ONLY).
New in version 0.7.0.
RDD
The same RDD with storage level set to MEMORY_ONLY
See also
RDD.persist()
RDD.unpersist()
RDD.getStorageLevel()
Examples
>>> rdd = sc.range(5) >>> rdd2 = rdd.cache() >>> rdd2 is rdd True >>> str(rdd.getStorageLevel()) 'Memory Serialized 1x Replicated' >>> _ = rdd.unpersist()