CakePHP-Memcached-Engine icon indicating copy to clipboard operation
CakePHP-Memcached-Engine copied to clipboard

Cache engine default is not available.

Open sakulstra opened this issue 10 years ago • 10 comments

hi there, i can't get this plugin to work, even when memcached seems to work. Here's what i've done: http://bin.cakephp.org/saved/113597 i don't really know if it's a bug or misconfiguration, so thx for any response ;) regards

sakulstra avatar Jan 03 '14 02:01 sakulstra

What version of CakePHP are you using ?

wa0x6e avatar Jan 03 '14 04:01 wa0x6e

I'm not sure, but I think your issue is coming from the way your setting up the Cache engine in the other engines.

Try not setting $engine = 'Memcached';

wa0x6e avatar Jan 03 '14 04:01 wa0x6e

oh sry forgot to mention that - i'm using cakephp 2.4.4... and i don't understand your second message. thanks for ur help, lukas

sakulstra avatar Jan 03 '14 09:01 sakulstra

The error Cache engine _cake_core_ is not available is weird, since _cake_core_ is not an engine name.

You are setting $engine = 'Memcached'; somewhere in your code. Leave it to the default setting.

wa0x6e avatar Jan 03 '14 11:01 wa0x6e

when i let it as default $engine = 'File'; i get an (like mentioned at the bottom of the bin) "Cache engine default is not available." error instead. thx, for ur help lukas

sakulstra avatar Jan 03 '14 11:01 sakulstra

Did you install CakePHP with composer ? Is the plugin located in app/Plugin/Memcached, or in plugins/Memcached ?

wa0x6e avatar Jan 03 '14 12:01 wa0x6e

it's locatedn in app/Plugin/Memcached and i installed cakephp and memcached with composer

sakulstra avatar Jan 03 '14 12:01 sakulstra

What's the steps ? You created a composer.json to install Cake, then created another composer.json inside to install all the plugins ?

wa0x6e avatar Jan 03 '14 12:01 wa0x6e

yes, i've an /httpdocs/Cakeroot/composer.json for installing cake and than i baked projects to /httpdocs/Someapp with an /httpdocs/Someapp/composer.json where i have my plugins and stuff

i just tried pasting the Memcached Engine directly into the Core and got another Error: cake_core cache was unable to write 'cake_dev_de-de' to Memcached cache in CakePHP/Cake/Cache/Cache.php on line 325

Uncaught exception 'CacheException' with message ' is not a valid serializer engine for Memcached' in CakePHP/Cake/Cache/Engine/MemcachedEngine.php:140

When i let $engine = 'File'; i don't even get an error, but i'm not sure if it's working

sakulstra avatar Jan 03 '14 12:01 sakulstra

I think in bootstrap.php file, you should config:

<?php 
//...
CakePlugin::load('Memcached');
App::uses('MemcachedEngine', 'Memcached.Lib/Cache/Engine');
Cache::config('default', array(
    'engine'    => 'Memcached.Memcached',
    // more options
));
//...

I did config success on my project. Sorry, my english is not good ^^

oanhnn avatar Jun 12 '14 09:06 oanhnn