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!
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

Sai Kiran Dasika
Courses Plus Student 7,278 PointsClearing 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
42,016 Pointsyou can call the removeAllObjects method on your cache object.
[cache removeAllObjects];

Sai Kiran Dasika
Courses Plus Student 7,278 PointsThank you very much :D
Sai Kiran Dasika
Courses Plus Student 7,278 PointsSai Kiran Dasika
Courses Plus Student 7,278 Pointswill this remove everything that is stored by the SAMCache cocoa pod ?
Stone Preston
42,016 PointsStone Preston
42,016 Pointsyes. assuming the cache variable above is pointing to the shared cache. you could also use
[[SAMCache sharedCache] removeAllObjects];