[libchamplain] Use memory cache in addition to file cache by default



commit 3c391566bb80cc21fd784855a48dc348a83a5e8e
Author: JiÅ?í Techet <techet gmail com>
Date:   Sun Aug 15 23:06:06 2010 +0200

    Use memory cache in addition to file cache by default
    
    Signed-off-by: JiÅ?í Techet <techet gmail com>

 champlain/champlain-map-source-factory.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/champlain/champlain-map-source-factory.c b/champlain/champlain-map-source-factory.c
index 6211d49..1fc00c2 100644
--- a/champlain/champlain-map-source-factory.c
+++ b/champlain/champlain-map-source-factory.c
@@ -385,6 +385,7 @@ champlain_map_source_factory_create_cached_source (ChamplainMapSourceFactory *fa
   ChamplainMapSourceChain *source_chain;
   ChamplainMapSource *tile_source;
   ChamplainMapSource *error_source;
+  ChamplainMapSource *memory_cache;
   ChamplainMapSource *file_cache;
   guint tile_size;
   ChamplainRenderer *renderer;
@@ -397,10 +398,14 @@ champlain_map_source_factory_create_cached_source (ChamplainMapSourceFactory *fa
   renderer = CHAMPLAIN_RENDERER (champlain_image_renderer_new ());
   file_cache = CHAMPLAIN_MAP_SOURCE (champlain_file_cache_new_full (100000000, NULL, renderer));
 
+  renderer = CHAMPLAIN_RENDERER (champlain_image_renderer_new ());
+  memory_cache = CHAMPLAIN_MAP_SOURCE (champlain_memory_cache_new_full (100, renderer));
+
   source_chain = champlain_map_source_chain_new ();
   champlain_map_source_chain_push (source_chain, error_source);
   champlain_map_source_chain_push (source_chain, tile_source);
   champlain_map_source_chain_push (source_chain, file_cache);
+  champlain_map_source_chain_push (source_chain, memory_cache);
 
   return CHAMPLAIN_MAP_SOURCE (source_chain);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]