diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Fave.php | 2 | ||||
-rw-r--r-- | classes/Notice.php | 5 | ||||
-rw-r--r-- | classes/Queue_item.php | 11 | ||||
-rw-r--r-- | classes/User.php | 2 |
4 files changed, 14 insertions, 6 deletions
diff --git a/classes/Fave.php b/classes/Fave.php index f4cf6256f..c3ec62dcf 100644 --- a/classes/Fave.php +++ b/classes/Fave.php @@ -42,7 +42,7 @@ class Fave extends Memcached_DataObject $ids = Notice::stream(array('Fave', '_streamDirect'), array($user_id, $own), ($own) ? 'fave:ids_by_user_own:'.$user_id : - 'fave:by_user:'.$user_id, + 'fave:ids_by_user:'.$user_id, $offset, $limit); return $ids; } diff --git a/classes/Notice.php b/classes/Notice.php index 2ba2f31b1..5ec0692d9 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1187,6 +1187,7 @@ class Notice extends Memcached_DataObject if (empty($cache) || $since_id != 0 || $max_id != 0 || (!is_null($since) && $since > 0) || + is_null($limit) || ($offset + $limit) > NOTICE_CACHE_WINDOW) { return call_user_func_array($fn, array_merge($args, array($offset, $limit, $since_id, $max_id, $since))); @@ -1209,7 +1210,7 @@ class Notice extends Memcached_DataObject $window = explode(',', $laststr); $last_id = $window[0]; $new_ids = call_user_func_array($fn, array_merge($args, array(0, NOTICE_CACHE_WINDOW, - $last_id, 0, null, $tag))); + $last_id, 0, null))); $new_window = array_merge($new_ids, $window); @@ -1224,7 +1225,7 @@ class Notice extends Memcached_DataObject } $window = call_user_func_array($fn, array_merge($args, array(0, NOTICE_CACHE_WINDOW, - 0, 0, null, $tag))); + 0, 0, null))); $windowstr = implode(',', $window); diff --git a/classes/Queue_item.php b/classes/Queue_item.php index 9b909ec22..295c321b5 100644 --- a/classes/Queue_item.php +++ b/classes/Queue_item.php @@ -4,7 +4,7 @@ */ require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; -class Queue_item extends Memcached_DataObject +class Queue_item extends Memcached_DataObject { ###START_AUTOCODE /* the code below is auto generated do not remove the above tag */ @@ -13,7 +13,7 @@ class Queue_item extends Memcached_DataObject public $notice_id; // int(4) primary_key not_null public $transport; // varchar(8) primary_key not_null public $created; // datetime() not_null - public $claimed; // datetime() + public $claimed; // datetime() /* Static get */ function staticGet($k,$v=null) @@ -24,7 +24,7 @@ class Queue_item extends Memcached_DataObject function sequenceKey() { return array(false, false); } - + static function top($transport) { $qi = new Queue_item(); @@ -54,4 +54,9 @@ class Queue_item extends Memcached_DataObject $qi = null; return null; } + + function &pkeyGet($kv) + { + return Memcached_DataObject::pkeyGet('Queue_item', $kv); + } } diff --git a/classes/User.php b/classes/User.php index 62a3f8a66..04b38a0d2 100644 --- a/classes/User.php +++ b/classes/User.php @@ -491,6 +491,8 @@ class User extends Memcached_DataObject // ;last cache, too $cache->delete(common_cache_key('fave:ids_by_user:'.$this->id)); $cache->delete(common_cache_key('fave:ids_by_user:'.$this->id.';last')); + $cache->delete(common_cache_key('fave:ids_by_user_own:'.$this->id)); + $cache->delete(common_cache_key('fave:ids_by_user_own:'.$this->id.';last')); } } |