Question: |
the problem is with $memcache = new Memcache;$memcache-connect(`127.0.0.1`, 11211) or die(`Memcache ` error`);in settings like included, what`s wrong?when processing produces a Memcache error, or you have other data to Memcache? |
Answer: |
Hello. the Question referred to the administrator, wait for amp. |
Answer: |
Hello the server is a Memcached server |
Question: |
But what if you need it? I have a website without it not working |
Answer: |
you can disable it in the settings, website will liberalite on opcashe |
Question: |
can you suggest how to rewrite the files of the website with Memcached on opcashe? |
Answer: |
this is changed in the admin site. go to admin panel and deactivate the Memcached |
Question: |
Hello, if possible, please tell me. how to adaptovit site structure with Memcached on opcashe? how to rewrite the code? |
Answer: |
Hello on what engine your website |
Question: |
we can say php java css html , that is engine is not like this |
Question: |
simply put $memcache = new Memcache; $memcache-connect(`127.0.0.1`, 11211) or die(`Memcache ` error`); count_user_room($room){ global $user, $npc, $memcache; $count_room = array(); $key = md5(`room`.$room); switch ($room) { case 100: $count_room[`120`] = \"; $count_room[`100`] = \"; $count_room[`113`] = \"; $count_room[`112`] = \"; $count_room[`111`] = \"; $count_room[`110`] = \"; $count_room[`109`] = \"; $count_room[`108`] = \"; $count_room[`107`] = \"; $count_room[`106`] = \"; $count_room[`105`] = \"; $count_room[`104`] = \"; $count_room[`103`] = \"; $count_room[`102`] = \"; $count_room[`101`] = \"; ## trying to take the data from cache if ($memcache-get($key)) { $owns = $memcache-get($key); }else { ## cache If no read data. $owns = sql_query(\"SELECT `id`, `invis`, `incity`, `room` FROM `users` WHERE `incity` = `\".INCITY.\"` AND `invis` = 0 AND `upd_online` = \".(time()-90).\" AND ((`room` = 100 AND `room` = 113) OR `room` = 120) \"); ## write it into memory. $memcache-set($key, $owns, MEMCACHE_COMPRESSED, 300); ## 5 minutes }part of code, how to rewrite? |
Answer: |
the request sent to the administrator. |
Answer: |
This is the correct spelling functions? if ($memcache-get($key)) { $owns = $memcache-get($key); }else { why this design? Maybe first just remember variable get data from the cache and test with them? |