mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:10:13 +01:00
fix a counter issue
This commit is contained in:
parent
842fc6b434
commit
b4867d79fe
@ -4,22 +4,7 @@ class ModelStatCounter extends Model {
|
||||
|
||||
public function get_counters(){
|
||||
$counter = array();
|
||||
$asize = 0;
|
||||
|
||||
if(MEMCACHED_ENABLED) {
|
||||
$memcache = Registry::get('memcache');
|
||||
|
||||
$counter = $memcache->get(Registry::get('counters'));
|
||||
|
||||
if(isset($counter[MEMCACHED_PREFIX . 'counters_last_update'])) {
|
||||
if(isset($counter[MEMCACHED_PREFIX . 'size'])) { $asize = $counter[MEMCACHED_PREFIX . 'size']; }
|
||||
if(isset($counter[MEMCACHED_PREFIX . 'stored_size'])) { $ssize = $counter[MEMCACHED_PREFIX . 'stored_size']; }
|
||||
unset($counter[MEMCACHED_PREFIX . 'size']);
|
||||
unset($counter[MEMCACHED_PREFIX . 'stored_size']);
|
||||
|
||||
return array ($asize, $ssize, $counter);
|
||||
}
|
||||
}
|
||||
$asize = $ssize = 0;
|
||||
|
||||
$query = $this->db->query("SELECT * FROM " . TABLE_COUNTER);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user