for file cache i use file.lastModified()
if smaller then my cahce time for example if file wasnt modified for 8 hours
it will be deleted
and when you access that file use
file.setLastModified(System.currentTimeMillis());
int timeout = 60 * 60 * main.imagecache; //main.imagecachen int hours for
keeping image in cache
long ts = System.currentTimeMillis() / 1000 - timeout;
if((file.lastModified() / 1000) < ts){
file.delete();
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en