Ionic-cli: Need a way to clear cache for the ionic resources command

Created on 9 Sep 2015  Â·  60Comments  Â·  Source: ionic-team/ionic-cli

Per conversation with Mike on Slack:

"the cache isn't kept locally
this is the resources command works. It uploads the files, generates the images, then sends them back
it keeps a small references to what project sent what
then when you try to run the command again, it will diff the two images, if nothings changed, it will jsut send the same images back
it's not a simple .cache file
so to make it rebuild the image, make a small change to the psd, then build it again"

I am receiving 3 corrupt files from the ionic resources command
✓ splash ios Default-667h.png (750x1334) from cache
✓ splash ios Default-736h.png (1242x2208) from cache
✓ splash ios Default-Portrait@2x~ipad.png (1536x2048) from cache

I need a way to rebuild these files without changing the image.
Please supply a way of running this command locally on the system or a way to clear the server cache.

Most helpful comment

just change date taken on your images properties, then do the ionic resources again, it works!

All 60 comments

+1

Hi, on Windows you can clean system temp files with ccleaner tool and ionic resources generates new splash and icons for your app.

Sorry for my english, i am from Chile.

I am using OS X and I am not sure your method will clear the Ionic cache as this resides on the Ionic servers not your local machine.

@jfcisternasm sorry, that doesn't work because it's Ionic's cache on their server that does it.

On osx try using memory clean app.

This can't be cleared locally as the cache is stored on Ionic's servers.

Any work around? Having similar issue in fedora

The OS doesn't matter. It's cached on Ionic's server. Change the source slightly and re-run the command.

That is a poor solution. Which is why I opened this request.

@hikumealan Sorry, I was responding to @introin about the work around.

I agree that it's a poor solution and am hopeful for a better solution.

I have changed all splash screen image in resource folder and re run 'ionic resource splash' and it worked [Command name i am writting with memory, check with official guide]

+1

+1

+1

+1

+1

+1
Image generated from cache seem broken, and no way to clean cache.

+1

+1

+1

I got in a situation where some of the cached versions of the android icons were empty (0KB) PNGs and the broken cached versions continue to get pulled down.

+1

+1

+1

+1 got corrupt file and now can't build android

according to https://github.com/driftyco/ionic-cli/issues/420 you can try to replace icons with new ones and if checksum is different it should recreate them. It worked for me.

+1

+1

after my flaky net connection, had to abort resources command and now my project won't build
had to change images to get it working again.
it would be good to have a command line way to tell ionic server to clear the cache

Adding one more pixel to the file did it for me. Wouldn't mind a cmd line param though.

+1

+1

just change date taken on your images properties, then do the ionic resources again, it works!

+1. I'm curious why is it so hard to achieve this with a parameter.

+1

+1

any resolution yet?

check if your request passing through a proxy network.

Hey all, going to close this as a dup of #420, looking to get this fixed/implemented in the next release.

i had the same problem. i think the right solution at this moment for this problem is to modify the image a bit so that the size increases/decreases. (Probably change the quality of the image or something.)

After that if you do "ionic resources" it will generate new icons and splash for you without referring to the old cache.

Yeah, I use the same solution. Just do it with a totally different image and then with your icon and splash.

On Mar 2, 2016, at 1:03 PM, Subodh Jena [email protected] wrote:

i had the same problem. i think the right solution at this moment for this problem is to modify the image a bit so that the size increases/decreases. (Probably change the quality of the image or something.)

After that if you do "ionic resources" it will generate new icons and splash for you without referring to the old cache.

—
Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic-cli/issues/582#issuecomment-191062904.

Fixed this problem by clearing the cache and deleting the temp files

+1 this is incredibly annoying. I have updated the images, updated their timestamps, and while the resources plugin does seem to not use the cache anymore, my images still don't update in the app.

+1

+1

+1

+1

+1

+1

+11

Same here.
Also if it's loading from cache it does not download the screens/icons.
It just outputs "from cache"... that's it, nothing gets pulled.
I'm at this even with different splash screens.

+1

Try to restart your computer

+1
My current workaround is to remove the splash asset and then add it back in and run ionic resources --splash

+1

You must do this: Rigth click on the icon/splash file -> properties -> details and then change the date in the first field, doing that ionic will interpret it is another file

@zgluis thanks. it works.

+1

+1

+1

This is an ancient issue, so I'm not sure what version of the CLI all these +1s are for. In the latest CLI, simply use the --force flag to ignore the cache and regenerate images.

If there are still issues with this, please create a new issue and fill out the issue template.

Was this page helpful?
0 / 5 - 0 ratings