Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/cache


Modified Files:
        evas_cache_image.c 


Log Message:


and use timestamp (mtime) for cache

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/cache/evas_cache_image.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_cache_image.c  9 Aug 2007 14:44:36 -0000       1.4
+++ evas_cache_image.c  11 Aug 2007 12:14:17 -0000      1.5
@@ -156,17 +156,22 @@
 
    im = evas_hash_find(cache->activ, hkey);
    if (im)
-     goto on_ok;
+     {
+       if (st.st_mtime == im->timestamp)
+         goto on_ok;
+     }
 
    im = evas_hash_find(cache->inactiv, hkey);
    if (im)
      {
-        cache->lru = evas_object_list_remove(cache->lru, im);
-        cache->inactiv = evas_hash_del(cache->inactiv, im->cache_key, im);
-        cache->activ = evas_hash_direct_add(cache->activ, im->cache_key, im);
-       cache->usage -= cache->func.mem_size_get(im);
-
-        goto on_ok;
+       if (st.st_mtime == im->timestamp)
+         {
+            cache->lru = evas_object_list_remove(cache->lru, im);
+            cache->inactiv = evas_hash_del(cache->inactiv, im->cache_key, im);
+            cache->activ = evas_hash_direct_add(cache->activ, im->cache_key, 
im);
+            cache->usage -= cache->func.mem_size_get(im);
+            goto on_ok;
+         }
      }
 
    im = evas_common_image_new();



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to