evermeer / EVURLCache

a NSURLCache subclass for handling all web requests that use NSURLRequest
Other
297 stars 49 forks source link

storeCachedResponse is never called #29

Closed nmDejamobile closed 8 years ago

nmDejamobile commented 8 years ago

Hi,

When creating a request using Alamofire and AlamofireObjectMapper the UVURLCache storeCachedResponse function is never called.

I have the two logs that say no file is found in the precache and cache and that's all.

I checked the folder in the simulator library path indicated in the log and no precache or cache folder are created/

Do I have to do something special to enable the cache file to be written ?

Here are the two log lines that are printed in the log each time I run the request, no other cache log are printed (user name and project infos are replaced):

EVURLCache.swift(85) cachedResponseForRequest:
    PRECACHE not found /Users/me/Library/Developer/CoreSimulator/Devices/DCB21973-3EF7-4EEF-BA45-D78CE0000000/data/Containers/Data/Application/154D180F-46C9-4B0F-BEAC-E5F800000000/Documents/Cache/mysite.com/paginated/index.html

EVURLCache.swift(88) cachedResponseForRequest:
    CACHE not found /Users/me/Library/Developer/CoreSimulator/Devices/DCB21973-3EF7-4EEF-BA45-D78CE0000000/data/Containers/Bundle/Application/8DCAAF7D-DC88-44B0-9A69-368800000000/myapp.app/PreCache/mysite.com/paginated/index.html

Running on simulator or real iPhone 6 device has the same effect. I use iOS 9 as target.

Thanks.

nmDejamobile commented 8 years ago

I don"t know what went wrong. I cleaned my code and it works.