Bug #4602

memcache doesn't work

Added by Irene Höppner over 12 years ago. Updated over 11 years ago.

Must have
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Has patch:


I tried to use memcache for parts of the cache.

Added the following configuration to Caches.yaml:

  backend: F3\FLW3\Cache\Backend\MemcachedBackend
    defaultLifetime: 0
    Servers: [localhost:11211]

This error occurs:

Fatal error: Call to a member function getScriptPathAndFilename() on a non-object in C:\Programme\xampp\htdocs\f3\intranet\Packages\Framework\FLOW3\Classes\Cache\Backend\MemcachedBackend.php on line 175

To check, wether the memcached-server is up and running, I used the following PHP-script:


$memcache = new Memcache;
$memcache->connect('localhost', 11211) or die ("Could not connect");

$version = $memcache->getVersion();
echo "Server's version: ".$version."<br/>\n";

$tmp_object = new stdClass;
$tmp_object->str_attr = 'test';
$tmp_object->int_attr = 123;

$memcache->set('key', $tmp_object, false, 10) or die ("Failed to save data at the server");
echo "Store data in the cache (data will expire in 10 seconds)<br/>\n";

$get_result = $memcache->get('key');
echo "Data from the cache:<br/>\n";



The result is:

Server's version: 1.2.1
Store data in the cache (data will expire in 10 seconds)
Data from the cache:
object(stdClass)#3 (2) { ["str_attr"]=> string(4) "test" ["int_attr"]=> int(123) }


Updated by Karsten Dambekalns over 12 years ago

  • Category set to Cache
  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Target version set to 1.0 alpha 5

Updated by Karsten Dambekalns over 12 years ago

First issue: Objects.yaml misses the dependencies for the backend, autowiring is off. Solved.
Next issue: Settings default options breaks with backends that don't support them... bah!

I'm at it...


Updated by Karsten Dambekalns over 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3210.

Also available in: Atom PDF