<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,27 +1,42 @@
 module Mack
   module Distributed
+    
+    class FileCache &lt; Cachetastic::Caches::Base
+      class &lt;&lt; self
+        include Mack::ViewHelpers::LinkHelpers
+      
+        def get(path)
+          raw = super(path) do
+            raw = &quot;&quot;
+            if File.exists?(path)
+              raw = File.read(path)
+
+              # preprocess the raw content so we can resolve css/javascript/image path
+              arr = raw.scan(/&lt;%=.*?%&gt;/)
+              arr.each do |scriptlet|
+                if scriptlet.match(/stylesheet/) or scriptlet.match(/javascript/) or scriptlet.match(/image/)
+                  res = ERB.new(scriptlet).result(binding)
+                  raw.gsub!(scriptlet, res)
+                end 
+              end # if arr.each
+            end # if File.exists?
+            
+            set(path, raw)
+          end # super(key)
+          return raw
+        end # def get
+      end # class &lt;&lt; self
+    end # class FileCache
+    
     class Views
       
       include Singleton
       include DRbUndumped
-      include Mack::ViewHelpers::LinkHelpers
       
       def get(resource)
         path = File.join(Mack.root, resource)
-        if File.exists?(path)
-          raw = File.read(path)
-          
-          # preprocess the raw content so we can resolve css/javascript/image path
-          arr = raw.scan(/&lt;%=.*?%&gt;/)
-          arr.each do |scriptlet|
-            if scriptlet.match(/stylesheet/) or scriptlet.match(/javascript/) or scriptlet.match(/image/)
-              res = ERB.new(scriptlet).result(binding)
-              raw.gsub!(scriptlet, res)
-            end
-          end
-          return raw
-        end
-        return &quot;&quot;
+        raw = FileCache.get(path)
+        return raw
       end
       
       class &lt;&lt; self</diff>
      <filename>mack-distributed/lib/mack-distributed/views/views.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b3da0fa937ab3a0e85517c36c6f7d9a0d1744ceb</id>
    </parent>
  </parents>
  <author>
    <name>dsutedja</name>
    <email>dsutedja@helium.com</email>
  </author>
  <url>http://github.com/markbates/mack-more/commit/f6f5f93fef03bbb8f049d18327563774597c1ed2</url>
  <id>f6f5f93fef03bbb8f049d18327563774597c1ed2</id>
  <committed-date>2008-08-15T14:20:47-07:00</committed-date>
  <authored-date>2008-08-15T14:20:47-07:00</authored-date>
  <message>Distributed views module now uses file cache [#96 state:resolved]</message>
  <tree>1217b0028d3eedefde8c5af34b99e695f421be3f</tree>
  <committer>
    <name>dsutedja</name>
    <email>dsutedja@helium.com</email>
  </committer>
</commit>
