Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to clear the cache of files? #34

Open
nene opened this issue Mar 8, 2018 · 4 comments
Open

How to clear the cache of files? #34

nene opened this issue Mar 8, 2018 · 4 comments

Comments

@nene
Copy link
Contributor

nene commented Mar 8, 2018

I did some batch-renaming of files outside Atom, and now the "Go to word" command takes me to old file that doesn't exist any more.

I've tried restarting Atom, but didn't help.

I know that import-js has some sort of cache, which I think is the culprit in here. But I don't have import-js installed separately from Atom. How do I find out the location of the cache to clear it?

@nene nene changed the title How to clear the cache of files How to clear the cache of files? Mar 8, 2018
@trotzig
Copy link
Contributor

trotzig commented Mar 8, 2018

rm $(importjs cachepath)

Or run importjs cachepath to get a path to the cache, then delete that file some other way.

Are you running Watchman? I think the watchman integration would have picked up the name changes.

@nene
Copy link
Contributor Author

nene commented Mar 8, 2018

Thanks! The removal of cache file worked. Though I needed to install command-line import-js in addition to the Atom plugin just to find out the cache path. Would be nice if there were some way inside Atom to clear the cache. Though yeah, even better would be to not need such reset at all.

I do have watchman installed. Should I run it somehow explicitly or does the import-js run it for me? The README tells me nothing about running it.

It might have been that I performed the file rename while Atom was closed. Would it also notice the change in that case?

@trotzig
Copy link
Contributor

trotzig commented Mar 8, 2018

It might have been that I performed the file rename while Atom was closed. Would it also notice the change in that case?

I believe it should pick up the change, but it could depend on the watchman config. If you set logLevel: 'debug' in import-js config and tail the logfile (tail -f $(importjs logpath)) you might be able to debug what happened.

I do have watchman installed. Should I run it somehow explicitly or does the import-js run it for me? The README tells me nothing about running it.

No, just having it installed should be enough. The main import-js readme mentions it, but I get how this project is mostly disconnected from the core.

Would be nice if there were some way inside Atom to clear the cache.

Agreed, this would be a good enhancement. I don't know much about how Atom plugins could surface something like this to the user. If you have ideas, I'd love to review a PR!

@nene
Copy link
Contributor Author

nene commented Mar 8, 2018

Thanks for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants