evermeer / EVURLCache

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

Not logging anything. #41

Closed tuhinsbuddy closed 7 years ago

tuhinsbuddy commented 7 years ago

Successfully integrated using pod. Using the version "2.10.0" in Swift 2.2 and Xcode 7.3.1 but not able to cache anything while hitting URL on UIWebView. Upon setting "EVURLCache.LOGGING = true" its not even logging anything on console. Please take a look and respond back. Following is the complete code inside "AppDelegate.swift".

            EVURLCache.LOGGING = true
            EVURLCache.MAX_FILE_SIZE = 26
            EVURLCache.MAX_CACHE_SIZE = 30
            EVURLCache.FORCE_LOWERCASE = true
            EVURLCache.activate()

BTW it is working when integrated in a blank and new project.

evermeer commented 7 years ago

Thanks for creating an issue here... I now remember that you also send an email a while back. An issue here will make me not forget it :-)

Could you please try doing the .activate on the controller where you have the UIWebView? Maybe you have some other code in your project that is setting the NSURLCache? There can only be one active at a time.

tuhinsbuddy commented 7 years ago

Understood. Currently digging into that as per your suggestion. One more thing is that is there any way to remove the cache from EVURLCache as per the URL on the fly. Like on button click or from inside an IBAction..??

tuhinsbuddy commented 7 years ago

Closing the issue. As I found another NSUrlCache modification inside my project. BTW Thanks for the help.