Twig缓存错误

I'm getting a Twig error ...

Uncaught exception 'RuntimeException' with message 'Unable to write in the cache directory (./cache/twig/69).

but only ever in that 1 hexadecimal directory listed above. If I then set the permissions on that folder to 0777 and also set the permissions on the files it contains, it works correctly but only for a few days. I then have to do the same fix and so on and so on. None of the other directories in the twig folder are affected. Any ideas?

Are you running commands from the CLI with a different user than the webserver? This often occurs if you run console commands as e.g. root and they create cache directories. Try clearing the cache completely after each CLI call.