Added API: clear_cache, clear_snapshots.