0

I want to add a directory in /cache. i.e. /cache/custom and if I run command:

./symfony clear:cache

All files in custom directory gets deleted. I don't want these files deleted even if I run ./symfony cc. Any solution?

2
  • 3
    Why don't you write your custom folder elsewhere? Like inside /data? What did you put inside this folder that can't be re-generated after? A cache folder should improve performance, if you remove stuff inside, it's shouldn't break your app. Commented May 31, 2013 at 11:27
  • if you want to do this kind of stuff, you can write your own shell script which call ./symfony cache:clear and after rm -rf /cache/custom/* Commented May 31, 2013 at 15:26

1 Answer 1

3

The cache directory has a different purpose. You should not write your custom files to folders like cache, logs, components, vendor because they are overridden while running some commands or while running the application.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.