Where in the system is cached application data stored? Is there any way to view it programmatically? I know there are several applications available in the market to view and clear the memory. But I want to know how exactly it is done.
First off, your device needs to be rooted. Then you'll be able to access it with (almost) any file manager. For list of where to look for things check this post right here at Android.SE
Without Root Method:
You can view individual Application Cache, Data, and ads caches and files by doing this:
from app drawer aka app windows, **Touch and hold the app icon until a window pops up like this
You see the popup window that says app info, NOW touch the small circle with the (i) inside. This takes you to the file system that All the Caches (for this Individual app) are.
Its Tedious but you can go through all your apps this way and delete ALOT of Crap that so far no app cleaner apps have ever done.