change find() to staticGet() to use cache

This commit is contained in:
Evan Prodromou 2010-02-16 09:58:33 -05:00
parent f414544d0d
commit 5a357d5399

View File

@ -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;
}