skip to Main Content

I have upgraded my application laravel version to 5.7 . cache driver is memcached. also i’m using docker compose with separate container for memcached, application, and webserver.

When I try cleaning cache it returns Failed to clear cache. Make sure you have the appropriate permissions.

when I change the cache driver to file it works well. Also, when I’m not running it in docker space it works well!

The problem is probably about flushing memcached. because when i try to clear it manually in my application it returns error 19 which stands for Memcached::RES_SOME_ERRORS! and I dont know what this means exactly!

p.s. and yes, I’ve created the data folder in storage/framework/cache directory with appropriate permissions.

Any suggestion?

2

Answers


  1. Chosen as BEST ANSWER

    as I'm using docker i should define hosts as conatiner names. so I defined MEMCACHED_HOST=memcached in .env file :-" also i defined application dependency for memcached container.


  2. I am assuming you are trying to set up a routine cronjob to clear the cache.

    Try running the clear command while you’re logged on in a wheel user account

    sudo php artisan cache:clear

    If it works, you may need to set up that cacheclear on an account with an appropriate access level for memory management tasks.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search