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

Ignored project files are also getting cached #1024

Closed
kaushalmodi opened this issue Jul 10, 2016 · 2 comments
Closed

Ignored project files are also getting cached #1024

kaushalmodi opened this issue Jul 10, 2016 · 2 comments

Comments

@kaushalmodi
Copy link
Contributor

kaushalmodi commented Jul 10, 2016

Expected behavior

Files from ignored projects should not be cached.

Actual behavior

Files from ignored projects are cached.

Steps to reproduce the problem

Ignore some project and then open some file in that project. You will see a message in the minibuffer that that file is getting cached (even when the project is ignored).

Environment & Version information

Projectile version information

Projectile version: 20160708.522

Emacs version

Emacs version: GNU Emacs 25.1.50.16 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
 of 2016-07-10, built using commit 466ee1b3ea76425d201b5d59950e88251870c836.

Operating system

RHEL 6.6

My temporary solution

(defun modi/advice-projectile-dont-cache-ignored-projects (&rest args)
  "Do not cache files from ignored projects when doing `find-file'."
  (let* ((project-root (projectile-project-p))
         (do-not-cache (projectile-ignored-project-p project-root)))
    do-not-cache))
(advice-add 'projectile-cache-files-find-file-hook :before-until
            #'modi/advice-projectile-dont-cache-ignored-projects)
@kaushalmodi
Copy link
Contributor Author

#1025

@bbatsov
Copy link
Owner

bbatsov commented Jul 11, 2016

Fix by #1025.

@bbatsov bbatsov closed this as completed Jul 11, 2016
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