Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Memcache problem... or php code? (http://www.bvlist.com/showthread.php?t=12373)

szaby 6th June 2021 19:50

Memcache problem... or php code?
 
Hello!

I attached a picture. My ID is the number 5. Why does memcache delete data from memory?

http://prntscr.com/14ebbq7

PHP Code:

if (($user $mc1->get_value('user' $id)) === false
{
  
$user_fields_ar_float = array('u.time_offset','u.total_donated');

  
$user_fields_ar_int = array('u.id','u.class','u.torrentsperpage','u.invites','u.invited_by','u.topicsperpage','u.postsperpage','u.last_browse','u.advent','u.login','u.added','u.last_login',
                              
'u.last_access','u.warneduntil','u.leechwarnuntil','u.vip_until','u.free_until','u.dst_in_use','u.auto_correct_dst','u.donoruntil','u.donated','u.faq_readed',

                              
'count(DISTINCT comm.id) AS comments',
                              
'count(DISTINCT posts.id) AS forumpost',                        
                                  
                              
'u.uploaded','u.downloaded','u.seedbonus');

  
$user_fields_ar_str = array('u.username','u.passhash','u.secret','u.editsecret','u.email','u.status','u.privacy','u.theme','u.acceptpms','u.ip','u.avatar','u.notifs','u.enabled','u.avatars','u.donor',
                              
'u.warned','u.deletepms','u.savepms','u.passkey','u.uploadpos','u.downloadpos','u.leechwarn','u.chatpost','u.pincode','u.forumpost','u.vip_added','u.cpanel','u.invisible',
                              
'u.highspeed','u.adult','u.observed','u.observed_reason','u.checked_user','u.free','u.disabled_reason',
                                  
                              
'u.modcomment','u.bonuscomment');
    
  
$user_fields implode(', 'array_merge($user_fields_ar_int$user_fields_ar_float$user_fields_ar_str));  
  
  
$r sql_query("SELECT $user_fields FROM users u 
                  LEFT JOIN comments comm ON (u.id = comm.user) 
                  LEFT JOIN posts ON (u.id = posts.userid) 
                  LEFT JOIN peers p ON (u.id = p.userid) 
                  WHERE u.id = "
.sqlesc($id)) OR sqlerr(__FILE____LINE__);
                  
  
$user mysqli_fetch_assoc($r) OR stderr("Hiba""Nincs felhasználó a megadott ID-vel.""danger");

  foreach (
$user_fields_ar_int as $i$user[$i] = (int)$user[$i];
  foreach (
$user_fields_ar_float as $i$user[$i] = (float)$user[$i];
  foreach (
$user_fields_ar_str as $i$user[$i] = $user[$i];
  
$mc1->cache_value('user' $id$user$INSTALLER09['expires']['user_cache']);


A $INSTALLER09['expires']['user_cache'] is set in the config file.

When it expires in 30 days ... It's in it first. No more for next search.

Thank You!


All times are GMT +2. The time now is 13:52.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2021, vBulletin Solutions Inc.