change find() to staticGet() to use cache
This commit is contained in:
parent
f414544d0d
commit
5a357d5399
@ -75,7 +75,6 @@ class Ostatus_profile extends Memcached_DataObject
|
||||
public $created;
|
||||
public $lastupdate;
|
||||
|
||||
|
||||
public /*static*/ function staticGet($k, $v=null)
|
||||
{
|
||||
return parent::staticGet(__CLASS__, $k, $v);
|
||||
@ -598,9 +597,10 @@ class Ostatus_profile extends Memcached_DataObject
|
||||
|
||||
// Double-check for oldies
|
||||
// @fixme this could explode horribly for multiple feeds on a blog. sigh
|
||||
$dupe = new Notice();
|
||||
$dupe->uri = $notice->uri;
|
||||
if ($dupe->find(true)) {
|
||||
|
||||
$dupe = Notice::staticGet('uri', $notice->uri);
|
||||
|
||||
if (!empty($dupe)) {
|
||||
common_log(LOG_WARNING, __METHOD__ . ": tried to save dupe notice for entry {$notice->uri} of feed {$this->feeduri}");
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user