What is the difference between persist and cache in apache spark

0 votes

How can we differenciate between persist() and cache() in Spark?

Jul 3, 2019 in Apache Spark by Nihal

recategorized Jul 4, 2019 by Gitika • 6,099 views

1 answer to this question.

0 votes

Hi,

persist () allows the user to specify the storage level whereas cache () uses the default storage level in Spark.

answered Jul 3, 2019 by Gitika
• 65,730 points
0 votes
Using cash technique we can save intermediate results in memory only.

Using persist we can save the intermediate results in five storage levels which are memory only, memory and disc, disc  only, memory only serialisation and memory and disc serialisation
answered Dec 27, 2022 by Deepthi

edited Mar 5, 2025

Related Questions In Apache Spark

+1 vote
3 answers

What is the difference between rdd and dataframes in Apache Spark ?

Comparison between Spark RDD vs DataFrame 1. Release ...READ MORE

answered Aug 28, 2018 in Apache Spark by shams
• 3,670 points
• 47,490 views
0 votes
1 answer

What is the difference between Apache Spark SQLContext vs HiveContext?

Spark 2.0+ Spark 2.0 provides native window functions ...READ MORE

answered May 26, 2018 in Apache Spark by nitinrawat895
• 11,380 points
• 6,660 views