Skeets icon indicating copy to clipboard operation
Skeets copied to clipboard

clearCache ignored?

Open longbowww opened this issue 10 years ago • 3 comments

I tried to just cache stuff 'per single run' of the application, so in appDelegate I did

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    let paths = NSSearchPathForDirectoriesInDomains(.CachesDirectory, .UserDomainMask, true)
    ImageManager.sharedManager.cache.diskDirectory = "\(paths[0])/ImageCache"

    ImageManager.sharedManager.cache.clearCache()
}

interestingly, this has no effect whatsoever, when I change the picture behind mypath.com/test.png it will display an old cached version from last run

longbowww avatar Aug 24 '15 11:08 longbowww

Interesting. Are you sure it isn't doing any kind of disk caching? The clearCache method only purges the in memory cache. If there is something cached on disk it will use that. I might try calling cleanDisk and clearCache see if that works.

daltoniam avatar Aug 25 '15 19:08 daltoniam

Did try both in appDelegate and in a ViewController -> no effect. :(

longbowww avatar Aug 25 '15 20:08 longbowww

Well that is less than ideal. I will try and look at it as time permits.

daltoniam avatar Sep 04 '15 03:09 daltoniam