کارنکردن کش apc و memcached
سلام وقت بخیر
توی کدایگنایتر کش apc و memcached کار نمیکنه
توی سرور امتحان کردم جواب نمیده با ادمین هم تماس داشتم میگه کد رو بررسی کن در سرور php 5.4 و ماژول apc , memcached هم فعال هست phpinfo گرفتم فعال بود در قسمت سی پنل هم خودم کنترل کردم میزون بود
این کد من هست
$this->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));
if ( ! $foo = $this->cache->get('foo')) { echo '<br />Saving to the cache!<br />'; $foo = 'foobarbaz!';
// Save into the cache for 5 minutes $this->cache->save('foo', $foo, 300); }
echo $foo;
خروجی :
Saving to the cache!
foobarbaz!
هرچی رفرش هم میزنم کار نمیکنه همینو میزنه
ببخشید کدها رو هم گذاشتم داخل بلاک ولی نمیدونم چرا بد نشون میده
is_supported میگیرم درست هست و اکستنشن کار میکنه
cache_info() میگیرم مقدار بر میگردونه
var_dump($this->cache->get_metadata('foo')); میگیرم اطلاعات کامل برمیگردونه
فکر میکنم یه جای کد یا فریمورک یه مشکلی داره و مشکل از نصب اکستنشنن نیست .
هرچی هم سایت های خارجی رو هم جستجو کردم باز نشد
حتی مسیر پوشه system رو هم absolute قرار دادم
/home/charcharkhkala/public_html/system
البته اون اسلش رو درست زدم اینجا هی میره اول ولی بهر حال درست ست کردم که قسمتهای دیگه سایت کار میکنه.
لطفا راهنمایی
نقل قول: کارنکردن کش apc و memcached
دوستان لطفا کمک !!!!:گریه::گریه::گریه::گریه:
نقل قول: کارنکردن کش apc و memcached
استادان گرامی لطفا راهنمایی نمایند. متشکرم
نقل قول: کارنکردن کش apc و memcached
55 با دیده شده ولی دریغ از یک پاسخ !!!
نقل قول: کارنکردن کش apc و memcached
ابتدا یه تست بگیرید ببینید اصلا apc درست کانفیگ شده
<?php
apc_store('testKey', 'testValue', -1); // ... or any negative integer.
// at this point, the key exists physically but is already technically invalidated by the ttl.
$test = apc_fetch('testKey'); // $test equals false.
// at this point, the key no longer exists physically.
?>
http://php.net/manual/en/function.apc-store.php
نقل قول: کارنکردن کش apc و memcached
سلام مهندس ممنونم از وقتی که گذاشتید
تست گرفتم هم $test رو اکو زدم
echo $test;echo '<br />';var_dump($test);
اینو زد :
testValue
string(9) "testValue"
نقل قول: کارنکردن کش apc و memcached
پس apc سرور درست کانفیگ شده
حالا آخرین نسخه ci رو هم بگیر(از روی guthub فایل zip رو دانلود کن) و یه تست روی اون بگیر
شاید نسخه ای که شما داری روش کار میکنی یه سری باگ داشته باشه و الان برطرف شده باشه
https://github.com/bcit-ci/CodeIgnit...ve/develop.zip
نقل قول: کارنکردن کش apc و memcached
سلام مهندس ممنون از لطف شما
انجام دادم ولی نشد
$this->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));
if (! $foo = $this->cache->get('foo')) { echo 'Saving to the cache!<br />'; $foo = 'foobarbaz!';
// Save into the cache for 5 minutes $this->cache->save('foo', $foo, 10); }
echo $foo;
echo '<br>';
var_dump($this->cache->cache_info());
خروجی :
Saving to the cache!
foobarbaz!
array(15) { ["num_slots"]=> int(4099) ["ttl"]=> int(7200) ["num_hits"]=> float(0) ["num_misses"]=> float(1) ["num_inserts"]=> float(1) ["expunges"]=> float(0) ["start_time"]=> int(1486468259) ["mem_size"]=> float(1200) ["num_entries"]=> int(1) ["file_upload_progress"]=> int(1) ["memory_type"]=> string(4) "mmap" ["locking_type"]=> string(19) "pthread mutex Locks" ["cache_list"]=> array(1) { [0]=> array(10) { ["info"]=> string(3) "foo" ["ttl"]=> int(10) ["type"]=> string(4) "user" ["num_hits"]=> float(0) ["mtime"]=> int(1486468259) ["creation_time"]=> int(1486468259) ["deletion_time"]=> int(0) ["access_time"]=> int(1486468259) ["ref_count"]=> int(0) ["mem_size"]=> int(1200) } } ["deleted_list"]=> array(0) { } ["slot_distribution"]=> array(1) { [1470]=> int(1) } }
واقعا دیگه نمیدونم چیکار بایست انجام داد:متفکر:
نقل قول: کارنکردن کش apc و memcached
سلام
مهندس لطفا راهننمایی فرمایید
متشکرم
نقل قول: کارنکردن کش apc و memcached
اساتید و بزرگواران لطفا راهنمایی