Skip to content

Commit

Permalink
Need username in cache key.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Nov 22, 2013
1 parent 24e7eec commit 5b5c2c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions turba/lib/Driver/Facebook.php
Expand Up @@ -84,7 +84,7 @@ protected function _search(array $criteria, array $fields, array $blobFields = a
{
$results = array();

$key = 'turba_fb_search|' . md5(implode('.', $criteria) . '_' . implode('.' , $fields) . '_' . implode('.', $blobFields));
$key = 'turba_fb_search|' . $GLOBALS['registry']->getAuth() . '|' . md5(implode('.', $criteria) . '_' . implode('.' , $fields) . '_' . implode('.', $blobFields));
if ($values = $this->_cache->get($key, 3600)) {
$values = json_decode($values, true);
return $count_only ? count($values) : $values;
Expand Down Expand Up @@ -167,7 +167,7 @@ protected function _read($key, $ids, $owner, array $fields,
*/
protected function _getEntry(array $keys, array $fields)
{
$key = 'turba_fb_getEntry|' . md5(implode('.', $keys) . '|' . implode('.', $fields));
$key = 'turba_fb_getEntry|' . $GLOBALS['registry']->getAuth() . '|' . md5(implode('.', $keys) . '|' . implode('.', $fields));
if ($values = $this->_cache->get($key, 3600)) {
$values = json_decode($values, true);
return $values;
Expand All @@ -189,7 +189,7 @@ protected function _getEntry(array $keys, array $fields)
*/
protected function _getAddressBook(array $fields = array())
{
$key = 'turba_fb_getAddressBook|' . md5(implode('.', $fields));
$key = 'turba_fb_getAddressBook|' . $GLOBALS['registry']->getAuth() . '|' . md5(implode('.', $fields));
if ($values = $this->_cache->get($key, 3600)) {
return json_decode($values, true);
}
Expand Down

0 comments on commit 5b5c2c2

Please sign in to comment.