0

Hello i Was advised on git hub to try to ask here.

When i use

Cache::remember("comment-".$comment->id."-project", 60, function () use ($filter) {
     return $filter->organization->id;
}); 

i get this error:

I even found where problem lies when folowing cache key is used: "filter-13-organization" The file name should be this md5 hash: 3cfc118695be71111eebccec273a3665ba31fd37 but is 3c/fc/3cfc118695be71111eebccec273a3665ba31fd37 instead zou can notice 2 additional / in string formate whitch are then pased as 2 subdirectories whitch due not exists!

I was expecting that FIle in cache 3cfc118695be71111eebccec273a3665ba31fd37 wil dont have additiona / whitch will be than parsed as subddirectories and i get this error

enter image description here

aynber
  • 22,380
  • 8
  • 50
  • 63
  • 1
    The `3c/fc/` isn't changing a hash, it's subdirectories in the cache directory. Laravel does this to keep the cache directory organized. – aynber Feb 23 '23 at 15:31
  • `chmod -R 777 storage bootstrap/cache` – Wahyu Kristianto Feb 23 '23 at 15:34
  • 1
    777 isn't recommended, that makes it world-writeable. But https://stackoverflow.com/questions/38888568/laravel-file-put-contents-failed-to-open-stream-permission-denied-for-sessio/72911821#72911821 recommends 775 – aynber Feb 23 '23 at 15:34
  • https://stackoverflow.com/questions/30639174/how-to-set-up-file-permissions-for-laravel might also help – aynber Feb 23 '23 at 15:36

0 Answers0