flagsmith-php-client icon indicating copy to clipboard operation
flagsmith-php-client copied to clipboard

Cache getting incorrectly accessed/read

Open JustinBack opened this issue 3 years ago • 4 comments

I am accessing flagsmith in a docker container via a PHP CMS and everytime after restarting I have to manually clear the cache folder (removing the cache folder via the entrypoint doesnt work aswell) due to an error that the cachedCall is null.

https://sentry.internal.jrbit.de/share/issue/4bf1cd4ca04b4cbcaca8541a37709f9e/

The cache folder is empty and after deleting it it works.

https://github.com/JRB-IT/crispcms/blob/68e313aedf9c30aa996ae10fead621acab24fe5b/cms/jrbit/class/crisp/api/Flagsmith.php#L53

Any clue on what the issue is an how to hotfix it? Running on Tag 2.1.1

JustinBack avatar Feb 12 '22 13:02 JustinBack

I just noticed deleting the subfolders of the symfony-cache folder is not enough. The symfony-cache folder itself has to be completely deleted.

JustinBack avatar Feb 12 '22 13:02 JustinBack

Thanks for raising the issue @JustinBack . From the first look, it looks like this could be a docker copy versus docker volume problem, because it refreshes on restart. Can you confirm if you are using COPY in your docker file? If not, can we have a look at your dockerfile? and docker-compose (if any), so we can build this at our end?

fzia avatar Feb 14 '22 09:02 fzia

It does use copy however not the /tmp/ folder.

https://github.com/JRB-IT/crispcms/blob/master/Dockerfile

JustinBack avatar Feb 14 '22 10:02 JustinBack

Thank you for the response. Taking a look.

fzia avatar Feb 14 '22 11:02 fzia