Commits

John Chandler  committed c042efd

Added urlargs stubs

  • Participants
  • Parent commits 382c941

Comments (0)

Files changed (1)

File fluidproxy/django_fluidproxy.py

 CACHE_TIMEOUT = 60*60
 
 
-def generate_cache_key( path ):
+def generate_cache_key( path, urlargs=None ):
     """ Returns a key suitable for calls to cache """
     h = hashlib.sha1()
     h.update( path )
             raise TypeError( "Argument fluid requires Fluid session object" )  # FIXME: sucky for anyone using a Mock FluidDB session
         self.fluid = fluid
 
-    def get( self, path ):
+    def get( self, path, urlargs=None ):
         """ Make a proxied FluidDB API call """
-        key   = generate_cache_key(path)
+        key   = generate_cache_key( path, urlargs )
         value = cache.get( key )
         if not value:
             value = self.fluid.db( "GET", path ).value
             path  = FluidDB path e.g. /path/to/tag
             value = value of path
         """        
-        cache.set( generate_cache_key(path), value )
+        cache.set( generate_cache_key(path, urlargs), value )
 
     def unload( self, path, urlargs=None ):
         """ Unload proxy cache
             path = FluidDB path e.g. /path/to/tag
         """
-        cache.delete( generate_cache_key(path) )
+        cache.delete( generate_cache_key(path, urlargs) )