Catalog.
clearCache
Removes all cached tables from the in-memory cache.
New in version 2.0.0.
Examples
>>> _ = spark.sql("DROP TABLE IF EXISTS tbl1") >>> _ = spark.sql("CREATE TABLE tbl1 (name STRING, age INT) USING parquet") >>> spark.catalog.clearCache() >>> spark.catalog.isCached("tbl1") False >>> _ = spark.sql("DROP TABLE tbl1")