ionic-cache-src
ionic-cache-src copied to clipboard
Problem with getCacheDir() method
Looks like there is problem with the method call getCacheDir() in cacheSrcStorage.It is returning undefined instead of data directory.
Also, a question not directly related though. Is it possible to make caching directory configurable. For e.g. in our case it makes more sense to us $window.cordova.file.externalDataDirectory instead of $window.cordova.file.dataDirectory as we want users to browse the content of images cache.
Root Cause: It looks like using var declaration on https://github.com/BenBBear/ionic-cache-src/blob/master/ionic-cache-src.js#L248 is making scope confine to only cacheSrc directive and hence preventing if from being used elsewhere (e.g. https://github.com/BenBBear/ionic-cache-src/blob/master/ionic-cache-src.js#L174).
Hello @srikanth235 , i had similar issue and i fixed it by removing "var" in this line https://github.com/BenBBear/ionic-cache-src/blob/master/ionic-cache-src.js#L248 i believe it's a mistake. i'll make pull request tomorrow.