Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Sai Kiran Dasika
PLUS
Sai Kiran Dasika
Courses Plus Student 7,278 Points

Clearing all Cache data

Hey guys do u how to clear all the cached data that when using the samcache cocoa pod.

2 Answers

Stone Preston
Stone Preston
42,016 Points

you can call the removeAllObjects method on your cache object.

[cache removeAllObjects];
Sai Kiran Dasika
Sai Kiran Dasika
Courses Plus Student 7,278 Points

will this remove everything that is stored by the SAMCache cocoa pod ?

Stone Preston
Stone Preston
42,016 Points

yes. assuming the cache variable above is pointing to the shared cache. you could also use

[[SAMCache sharedCache] removeAllObjects];