Cache Driver for production site



  • Hi all, i noticed that the default setting for CACHE_DRIVER is array in my .env. I thought the usual default for Laravel was file, has this been set to array for Asgard?

    Anyway, I tried changing it to file and got "This cache store does not support tagging.". I cleared cache etc, so assume this is a package used by Asgard which doesn't support file caching.

    What does everyone use for their cache driver in production? I'm looking at installing Redis on my VPS. Never done it before, so any tips, help etc would be appreciated.

    Thanks.


  • admin

    Hello,

    That's the reason array is the default, file driver doesn't support cache tags. Cache tags is not an asgard feature btw.

    Production should use redis or similar though.



  • Thanks. I've installed and enabled Redis. Not seeing much performance boost though. My TTFB is > 600ms - is that normal for Laravel/Asgard? Can you suggest any ways to improve performance? I haven't added much custom code, database is pretty much fresh apart from several pages. Nothing more going on in the app other than Asgard.


  • admin

    That depends on your server. Asgard is below 300ms on the cheapest digital ocean server.



  • Strange, I have a VPS, 2 cores, 4GB RAM, but still only getting 600+ms. I have set up blackfire on the server, and it is reporting that Composer\Autoload\includeFile is taking a total of 250ms on its own (over 299 calls).

    Illuminate\Container\Container::build is also being called 141 times with total time of 49ms.

    Does this seem normal to you? Do you have any ideas of how to reduce these?


  • admin

    That's how composer works yes.

    Did you run composer dump autoload -o, to optimise the autoloader?



  • Hi @nWidart - thanks, I hadn't run it no, but now have on the VPS and still not much difference - 296 calls, 236ms...!


Log in to reply
 

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.