<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -67,7 +67,11 @@ class Cache
 	 */
     public function library($library, $method, $arguments = array(), $expires = null)
     {
-    	$this-&gt;ci-&gt;load-&gt;library($library);
+    	if(!in_array(ucfirst($library), $this-&gt;ci-&gt;load-&gt;_ci_classes))
+    	{
+    		$this-&gt;ci-&gt;load-&gt;library($library);
+    	}
+
     	return $this-&gt;call($library, $method, $arguments, $expires);
     }
     
@@ -79,7 +83,11 @@ class Cache
 	 */
     public function model($model, $method, $arguments = array(), $expires = null)
     {
-    	$this-&gt;ci-&gt;load-&gt;model($model);
+    	if(!in_array(ucfirst($model), $this-&gt;ci-&gt;load-&gt;_ci_classes))
+    	{
+    		$this-&gt;ci-&gt;load-&gt;model($model);
+    	}
+
     	return $this-&gt;call($model, $method, $arguments, $expires);
     }
     </diff>
      <filename>application/libraries/Cache.php</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ class Twitter_m extends Model {
 		// Only apply a cache to these methods
 		if( in_array($method, array('public_timeline', 'friends_timeline', 'user_timeline', 'show', 'replies', 'friends', 'followers')) )
 		{	
-			return $this-&gt;cache-&gt;model('twitter_lib', $method, $arguments, $this-&gt;CI-&gt;settings-&gt;item('twitter_cache') * 60);
+			return $this-&gt;cache-&gt;library('twitter_lib', $method, $arguments, $this-&gt;CI-&gt;settings-&gt;item('twitter_cache') * 60);
 		}
 		
 		// Run as normal without worrying about a cache</diff>
      <filename>application/modules/twitter/models/twitter_m.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c36870c9d1fe86aaa03eac0a77fddcb88596fa62</id>
    </parent>
  </parents>
  <author>
    <name>Phil Sturgeon</name>
    <email>email@philsturgeon.co.uk</email>
  </author>
  <url>http://github.com/philsturgeon/pyrocms/commit/e3c21e624e4abc8eca9b61d6b1c0483bdf7a9da4</url>
  <id>e3c21e624e4abc8eca9b61d6b1c0483bdf7a9da4</id>
  <committed-date>2009-11-04T16:03:55-08:00</committed-date>
  <authored-date>2009-11-04T16:03:55-08:00</authored-date>
  <message>bug: Lazy-loading in Cachel ibrary was seriously f**king with Twitter and a few other things. (ticket #46)</message>
  <tree>7378a5ee3342dc410ce41175f6f74f257145c529</tree>
  <committer>
    <name>Phil Sturgeon</name>
    <email>email@philsturgeon.co.uk</email>
  </committer>
</commit>
