Clearing Symfony cache for another application

后端 未结 5 2266
不知归路
不知归路 2021-02-10 05:37

I would like to clear my frontend application\'s cache from an action in my backend application.

How can I achieve this?

5条回答
  •  自闭症患者
    2021-02-10 06:10

    I don't think there is no "clean" way to do the job, as different apps are treated as quite separated environments in symfony. Obviously the job may be done in a less or more dirty way, choose your way to remove any file in the cache/ dir, run the phing task clear-cache (cc) etc ...

    you can simply run rm -rf cache/*, but you could break some client request. The simpler thing could be to run symfony cc via passthru() or exec()

提交回复
热议问题