*

Wiz

  • ****
  • 138 posts
Memcached support
« on: December 14, 2022, 09:54:19 AM »
Hi @MB,

I am attaching an updated memcached cache class to possibly include in the next release of OsClass.

I think it's best to separate memcache and memcached cache classes as memcached can have a max of 3 add/set parameters, key - value - expiration, while memcache can have 4, key - var - flag - expire.

I also edited the memcache class and took out references of memcached so people don't get confused. Both memcache and memcached can't be set/activated at the same time.

As for config.php configuration options - nothing changes except the cache class name ie.

Code: [Select]
// MemCached caching option for unix socket (database queries cache)
define('OSC_CACHE', 'memcached');
$_cache_config[] = array('default_host' => '/usr/local/var/run/memcached.sock', 'default_port' => 0, 'default_weight' => 1);

OR

Code: [Select]
// MemCached caching option for tcp (database queries cache)
define('OSC_CACHE', 'memcached');
$_cache_config[] = array('default_host' => 'x.x.x.x', 'default_port' => 112211, 'default_weight' => 1);

OR

Code: [Select]
// MemCache caching option for unix socket (database queries cache)
define('OSC_CACHE', 'memcache');
$_cache_config[] = array('default_host' => '/usr/local/var/run/memcache.sock', 'default_port' => 0, 'default_weight' => 1);

OR

Code: [Select]
// MemCache caching option for tcp (database queries cache)
define('OSC_CACHE', 'memcache');
$_cache_config[] = array('default_host' => 'x.x.x.x', 'default_port' => 112211, 'default_weight' => 1);


Cheers

Marked as best answer by frosticek on December 17, 2022, 11:18:55 AM
*

MB Themes

Re: Memcached support
« Reply #1 on: December 15, 2022, 02:30:14 PM »
Great, thanks, it's implemented ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Wiz

  • ****
  • 138 posts
Re: Memcached support
« Reply #2 on: December 17, 2022, 09:29:30 AM »
Thank you!