Skip to content
Browse files

Added consumer and access keys to cache key

  • Loading branch information...
1 parent 99b624f commit ad18e05288811a83eccd3524cf772568c15ecfd8 @dg committed Sep 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 twitter.class.php
View
2 twitter.class.php
@@ -259,7 +259,7 @@ public function cachedRequest($request, $data = NULL, $cacheExpire = NULL)
$cacheExpire = self::$cacheExpire;
}
- $cacheFile = self::$cacheDir . '/twitter.' . md5($request . json_encode($data));
+ $cacheFile = self::$cacheDir . '/twitter.' . md5($request . json_encode($data) . serialize(array($this->consumer, $this->token)));
$cache = @file_get_contents($cacheFile); // intentionally @
$cache = strncmp($cache, '<', 1) ? @json_decode($cache) : @simplexml_load_string($cache); // intentionally @
if ($cache && @filemtime($cacheFile) + $cacheExpire > time()) { // intentionally @

0 comments on commit ad18e05

Please sign in to comment.
Something went wrong with that request. Please try again.