       (with-eval-after-load 'ivy
         (setq projectile-completion-system 'ivy)))
 
-
-    ;; Make the file list creation faster by NOT calling `projectile-get-sub-projects-files'
-    (defun projectile-get-repo-files ()
-      (projectile-files-via-ext-command (projectile-get-ext-command)))
-
     ;; Don't consider my home dir as a project
     (add-to-list 'projectile-ignored-projects `,(concat (getenv "HOME") "/"))
-
-    ;; Patch
-    (defun projectile-cache-files-find-file-hook ()
-      "Function for caching files with `find-file-hook'."
-      (when (and projectile-enable-caching
-                 (projectile-project-p)
-                 (not (member (projectile-project-p) projectile-ignored-projects)))
-        (projectile-cache-current-file)))
 
     ;; (setq projectile-enable-caching nil)
     (setq projectile-enable-caching t) ; Enable caching, otherwise

for getting a list of all files in a project."
        modi/projectile-ag-command))

With prefix argument (`C-u'), also kill the special buffers."
      (interactive "P")
      (let ((bufs (buffer-list (selected-frame))))
        (dolist (buf bufs)
          (with-current-buffer buf
            (let ((buf-name (buffer-name buf)))
              (when (or (null (projectile-project-p))
                        (and kill-special
                             (string-match "^\*" buf-name)))
                ;; Preserve buffers with names starting with *scratch or *Messages
                (unless (string-match "^\\*\\(\\scratch\\|Messages\\)" buf-name)
                  (message "Killing buffer %s" buf-name)
                  (kill-buffer buf))))))))

    ;; Patch
    ;; Use older version of `projectile-cache-current-file' that did not cache

    ;; (setq projectile-mode-line " ℙ")
    (setq projectile-mode-line "​P")

    (defun modi/projectile-project-name (project-root)
      "Return project name after some modification if needed.

