I am restarting my developer newsletter, blog. What would you like to know how to do? Once, I have some content, I'll post how to subscribe.
I am restarting my developer newsletter, blog. What would you like to know how to do? Once, I have some content, I'll post how to subscribe.
Hi Jeff Bickart
One question would be how to configure / use external cache like redis. It is highly recommended within the sugar documentation but there is nothing clear on how to use it and the benefits (not only for session caching for example).
Thanks in advance :-)
Enes
Here is a great blog post from Piotr Gadzinski https://gadoma.com/how-to-improve-sugarcrm-performance-in-2019/, take a look at section 6.
Redis does a lot more than store the session information. Redis will improve the overall speed of the application by caching all of the key values. Internally, Sugar has a bunch of ways that it caches data. It may cache to "disk", "DB", or a cache server. The cache server will improve the overall speed.
Hi Jeff Bickart
Thanks for the article, I saw it yesterday. I tried to configure it with the following parameters but the cache is still generated in cache folder, is it correct this way ?
$sugar_config['external_cache_force_backend'] = 'redis'; $sugar_config['cache']['backend'] = 'Sugarcrm\Sugarcrm\Cache\Backend\Redis'; 'external_cache' => array ( 'memcache' => array ( 'host' => 'localhost', 'port' => '11211', ), 'redis' => array ( 'host' => '127.0.0.1', 'port' => '6379', ), ), 'external_cache_disabled' => false, 'external_cache_disabled_apc' => true, 'external_cache_disabled_memcache' => true, 'external_cache_disabled_memcached' => true, 'external_cache_disabled_redis' => false, 'external_cache_disabled_smash' => true, 'external_cache_disabled_wincache' => true, 'external_cache_disabled_zend' => true,
Is there anything else I should do ?
Best regards,
Enes
Hi Jeff Bickart
Thanks for the article, I saw it yesterday. I tried to configure it with the following parameters but the cache is still generated in cache folder, is it correct this way ?
$sugar_config['external_cache_force_backend'] = 'redis'; $sugar_config['cache']['backend'] = 'Sugarcrm\Sugarcrm\Cache\Backend\Redis'; 'external_cache' => array ( 'memcache' => array ( 'host' => 'localhost', 'port' => '11211', ), 'redis' => array ( 'host' => '127.0.0.1', 'port' => '6379', ), ), 'external_cache_disabled' => false, 'external_cache_disabled_apc' => true, 'external_cache_disabled_memcache' => true, 'external_cache_disabled_memcached' => true, 'external_cache_disabled_redis' => false, 'external_cache_disabled_smash' => true, 'external_cache_disabled_wincache' => true, 'external_cache_disabled_zend' => true,
Is there anything else I should do ?
Best regards,
Enes
Enes Saridogan it appears that you have both Redis and Memcache configured. You only need one of them. Having both is not needed. If you want to store "session" information in a cache, those settings would need to be setup inside of your PHP configuration.
With Redis configured, you can use the Redis CLI and see what is stored in the cache.
redis-cli 127.0.0.1:6379> keys *
Which will result in showing you all of the keys; such as
Notice line "20" is as PHP Session. The others are Sugar Cache entries