# Cache Types

**URL:** <https://community.thinkgeo.com/t/cache-types/692>\
**Category:** WinForms\
**Created:** [September 15, 2009, 6:38pm UTC](https://community.thinkgeo.com/t/cache-types/692 "2009-09-15T18:38:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [September 15, 2009, 6:38pm UTC](https://community.thinkgeo.com/t/cache-types/692/1 "2009-09-15T18:38:31Z")

</div>

Greetings,

I'm&nbsp;just&nbsp;getting&nbsp;into&nbsp;optimizing&nbsp;the&nbsp;rendering&nbsp;performance&nbsp;by&nbsp;using&nbsp;caches,&nbsp;and&nbsp;was&nbsp;wondering&nbsp;if&nbsp;you&nbsp;could&nbsp;describe&nbsp;each&nbsp;type&nbsp;of&nbsp;cache&nbsp;and&nbsp;how&nbsp;each&nbsp;specific&nbsp;type&nbsp;of&nbsp;cache&nbsp;helps&nbsp;in&nbsp;the&nbsp;performance&nbsp;of&nbsp;the&nbsp;application.

Thanks&nbsp;in&nbsp;advance,

Ryan

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [September 16, 2009, 12:28am UTC](https://community.thinkgeo.com/t/cache-types/692/2 "2009-09-16T00:28:37Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;would&nbsp;be&nbsp;very&nbsp;glad&nbsp;if&nbsp;my&nbsp;following&nbsp;descriptions&nbsp;would&nbsp;give&nbsp;you&nbsp;any&nbsp;helps.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Now&nbsp;we&nbsp;have&nbsp;provided&nbsp;three&nbsp;kinds&nbsp;of&nbsp;BitmapTileCache&nbsp;:&nbsp;InMemoryBitmapTileCache,&nbsp;FileBitmapTileCache,&nbsp;SessionFileBitmapTileCache.&nbsp;  
&nbsp;&nbsp;  
&nbsp;The&nbsp;difference&nbsp;between&nbsp;the&nbsp;InMemoryBitmapTileCache&nbsp;vs&nbsp;FileBitmapTileCache&nbsp;&nbsp;is&nbsp;as&nbsp;its&nbsp;name&nbsp;said,&nbsp;the&nbsp;cached&nbsp;tiles&nbsp;is&nbsp;saved&nbsp;in&nbsp;memory&nbsp;vs&nbsp;disk,&nbsp;so&nbsp;when&nbsp;the&nbsp;application&nbsp;is&nbsp;shut&nbsp;down,&nbsp;the&nbsp;tiles&nbsp;for&nbsp;the&nbsp;InMemoryBitmapTileCache&nbsp;will&nbsp;go&nbsp;away,&nbsp;while&nbsp;the&nbsp;FileBitmapTileCache&nbsp;can&nbsp;be&nbsp;persistent&nbsp;in&nbsp;disk,&nbsp;while&nbsp;it&nbsp;is&nbsp;probably&nbsp;the&nbsp;InmemoryBitmapTileCache&nbsp;would&nbsp;be&nbsp;fast&nbsp;if&nbsp;not&nbsp;too&nbsp;much&nbsp;memory&nbsp;was&nbsp;taken&nbsp;up.&nbsp;  
&nbsp;&nbsp;  
&nbsp;The&nbsp;SessionFileBitmapTileCache&nbsp;is&nbsp;very&nbsp;similar&nbsp;to&nbsp;FileBitmapTileCache,&nbsp;while&nbsp;the&nbsp;special&nbsp;place&nbsp;is&nbsp;that&nbsp;when&nbsp;your&nbsp;call&nbsp;the&nbsp;ClearCache&nbsp;,&nbsp;the&nbsp;SessionFileBitmapTileCache&nbsp;will&nbsp;not&nbsp;clear&nbsp;the&nbsp;cached&nbsp;tiles&nbsp;immediately&nbsp;as&nbsp;FileBitmapTileCache&nbsp;did,&nbsp;it&nbsp;will&nbsp;only&nbsp;created&nbsp;a&nbsp;new&nbsp;folder&nbsp;for&nbsp;its&nbsp;new&nbsp;caches.&nbsp;Meanwhile,&nbsp;a&nbsp;background&nbsp;thread&nbsp;will&nbsp;be&nbsp;started&nbsp;to&nbsp;delete&nbsp;those&nbsp;obsolete&nbsp;cached&nbsp;folders.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;

---

<div class="post-metadata">

**Author:** ![Ryan1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@Ryan1](https://community.thinkgeo.com/u/Ryan1)\
**Post date:** [September 16, 2009, 10:57am UTC](https://community.thinkgeo.com/t/cache-types/692/3 "2009-09-16T10:57:07Z")

</div>

Yale,

Thanks&nbsp;for&nbsp;your&nbsp;reply,&nbsp;that&nbsp;helps&nbsp;me&nbsp;out&nbsp;a&nbsp;lot.&nbsp;&nbsp;Could&nbsp;you&nbsp;tell&nbsp;me&nbsp;the&nbsp;difference&nbsp;between&nbsp;TileCache&nbsp;and&nbsp;PreviewTileCache&nbsp;on&nbsp;an&nbsp;overlay?

Thanks,

Ryan

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [September 16, 2009, 9:02pm UTC](https://community.thinkgeo.com/t/cache-types/692/4 "2009-09-16T21:02:16Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;The&nbsp;preview&nbsp;image&nbsp;is&nbsp;the&nbsp;image&nbsp;shown&nbsp;on&nbsp;map&nbsp;control&nbsp;when&nbsp;it&nbsp;is&nbsp;still&nbsp;drawing&nbsp;on&nbsp;background&nbsp;and&nbsp;the&nbsp;preview&nbsp;image&nbsp;can&nbsp;only&nbsp;work&nbsp;when&nbsp;the&nbsp;ThreadMode&nbsp;is&nbsp;MultiThreadMode&nbsp;and&nbsp;the&nbsp;tile&nbsp;cache&nbsp;is&nbsp;turned&nbsp;on.&nbsp;  
&nbsp;&nbsp;  
&nbsp;So&nbsp;it&nbsp;is&nbsp;obvious&nbsp;that&nbsp;the&nbsp;TileCache&nbsp;is&nbsp;for&nbsp;the&nbsp;TileImages&nbsp;itself&nbsp;while&nbsp;the&nbsp;PreviewTileCache&nbsp;is&nbsp;for&nbsp;the&nbsp;PreviewTileImages.&nbsp;And&nbsp;you&nbsp;do&nbsp;not&nbsp;need&nbsp;to&nbsp;worry&nbsp;about&nbsp;it&nbsp;when&nbsp;you&nbsp;using&nbsp;the&nbsp;SingleThead&nbsp;mode&nbsp;or&nbsp;without&nbsp;turning&nbsp;on&nbsp;the&nbsp;TileCache.&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;I&nbsp;am&nbsp;not&nbsp;clear&nbsp;enough&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;
