Notice: Undefined property: Friendica\App::$performance in /var/www/virtual/haeder.net/friendica/htdocs/addon/rendertime/rendertime.php on line 28

Warning: Cannot modify header information - headers already sent by (output started at /var/www/virtual/haeder.net/friendica/htdocs/addon/rendertime/rendertime.php:28) in /var/www/virtual/haeder.net/friendica/htdocs/src/App.php on line 1422

Warning: Cannot modify header information - headers already sent by (output started at /var/www/virtual/haeder.net/friendica/htdocs/addon/rendertime/rendertime.php:28) in /var/www/virtual/haeder.net/friendica/htdocs/src/App.php on line 1423

Warning: Cannot modify header information - headers already sent by (output started at /var/www/virtual/haeder.net/friendica/htdocs/addon/rendertime/rendertime.php:28) in /var/www/virtual/haeder.net/friendica/htdocs/src/App.php on line 1430

Warning: Cannot modify header information - headers already sent by (output started at /var/www/virtual/haeder.net/friendica/htdocs/addon/rendertime/rendertime.php:28) in /var/www/virtual/haeder.net/friendica/htdocs/src/App.php on line 1431

Warning: Cannot modify header information - headers already sent by (output started at /var/www/virtual/haeder.net/friendica/htdocs/addon/rendertime/rendertime.php:28) in /var/www/virtual/haeder.net/friendica/htdocs/src/App.php on line 1432

Warning: Cannot modify header information - headers already sent by (output started at /var/www/virtual/haeder.net/friendica/htdocs/addon/rendertime/rendertime.php:28) in /var/www/virtual/haeder.net/friendica/htdocs/src/App.php on line 1433
Roland's Friendica Network (profile)
f.haeder.net

No performance improvement by memcache or redis?

I have now tried both, #memcache and #redis, to set single keys in cache. It seems both perform very poor compared to #in-progress caching.

So really no improvement if they are being used? And pipelining in redis won't help here much as I really have to "atomically" set/test/get key-value pairs.

So my in-progress cache as following seems to be the fastest:

function someCachedFooValue ($someValue) {
	if (!isset($cache[__FUNCTION__][$someValue])) {
		$cache[__FUNCTION__][$someValue] = doSomethingFooExpensive($someValue);
	}

	return $cache[__FUNCTION__][$someValue];
}


Here I want to cache the value from the expensive (long-taking) function doSomethingFooExpensive() if it is is not here.

This way seems to be the fastest way, sadly.
#memcache #redis #in-progress caching in-progress memcache performance redis
newer older