# Tile Caching

**URL:** <https://community.thinkgeo.com/t/tile-caching/7159>\
**Category:** Services\
**Created:** [August 25, 2011, 4:14pm UTC](https://community.thinkgeo.com/t/tile-caching/7159 "2011-08-25T16:14:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dustin](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@Dustin](https://community.thinkgeo.com/u/Dustin)\
**Post date:** [August 25, 2011, 4:14pm UTC](https://community.thinkgeo.com/t/tile-caching/7159/1 "2011-08-25T16:14:49Z")

</div>

Hello,

I'm&nbsp;trying&nbsp;to&nbsp;work&nbsp;with&nbsp;tile&nbsp;caching&nbsp;to&nbsp;speed&nbsp;up&nbsp;my&nbsp;WMS&nbsp;implementation,&nbsp;and&nbsp;I&nbsp;can't&nbsp;seem&nbsp;to&nbsp;get&nbsp;the&nbsp;files&nbsp;to&nbsp;save.&nbsp;Calling&nbsp;the&nbsp;'SaveTiles'&nbsp;method&nbsp;of&nbsp;the&nbsp;FileNativeImageTileCache&nbsp;or&nbsp;the&nbsp;FileBitmapTileCache&nbsp;doesn't&nbsp;seem&nbsp;to&nbsp;actually&nbsp;do&nbsp;anything.&nbsp;Might&nbsp;you&nbsp;be&nbsp;able&nbsp;to&nbsp;help&nbsp;me&nbsp;figure&nbsp;this&nbsp;out?&nbsp;

Thanks&nbsp;

-Dustin

&nbsp;

&nbsp;

`Bitmap b = new Bitmap(MapStream);TileMatrix tm = new MapSuiteTileMatrix(MapEngine.GetCurrentScale(MapRequest.BoundingBox, MapRequest.Width, GeographyUnit.DecimalDegree), 128, 128, GeographyUnit.DecimalDegree);FileNativeImageTileCache t = new FileNativeImageTileCache(this.MapPath("") + @"\App_Data\Cache", "Stuff", TileImageFormat.Png, tm);t.SaveTiles(b, MapRequest.BoundingBox);`

---

<div class="post-metadata">

**Author:** ![Dustin](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@Dustin](https://community.thinkgeo.com/u/Dustin)\
**Post date:** [August 26, 2011, 7:49am UTC](https://community.thinkgeo.com/t/tile-caching/7159/2 "2011-08-26T07:49:36Z")

</div>

Alright,&nbsp;scratch&nbsp;that,&nbsp;it&nbsp;looks&nbsp;like&nbsp;I&nbsp;had&nbsp;two&nbsp;issues.&nbsp;One&nbsp;was&nbsp;folder&nbsp;security,&nbsp;somehow&nbsp;the&nbsp;folder&nbsp;got&nbsp;set&nbsp;to&nbsp;ReadOnly.&nbsp;I&nbsp;also&nbsp;switched&nbsp;to&nbsp;FileBitmapCache,&nbsp;and&nbsp;that&nbsp;seemed&nbsp;to&nbsp;solve&nbsp;the&nbsp;problem.&nbsp;

-Dustin

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [August 30, 2011, 3:11pm UTC](https://community.thinkgeo.com/t/tile-caching/7159/3 "2011-08-30T15:11:41Z")

</div>

Hi&nbsp;Dustin,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Have&nbsp;you&nbsp;use&nbsp;the&nbsp;FileBitmapTileCache&nbsp;cache&nbsp;the&nbsp;tile&nbsp;image&nbsp;succeed&nbsp;and&nbsp;the&nbsp;FileNativeImageTileCache&nbsp;cannot&nbsp;do&nbsp;that?&nbsp;  
&nbsp;&nbsp;  
&nbsp;That’s&nbsp;weird&nbsp;because&nbsp;it&nbsp;looks&nbsp;the&nbsp;two&nbsp;layer&nbsp;use&nbsp;the&nbsp;same&nbsp;function&nbsp;to&nbsp;save&nbsp;tile&nbsp;in&nbsp;code.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don

---

<div class="post-metadata">

**Author:** ![Dustin](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/5daacb/32.png) [@Dustin](https://community.thinkgeo.com/u/Dustin)\
**Post date:** [September 8, 2011, 9:31am UTC](https://community.thinkgeo.com/t/tile-caching/7159/4 "2011-09-08T09:31:41Z")

</div>

Maybe&nbsp;it&nbsp;was&nbsp;just&nbsp;the&nbsp;folder&nbsp;security,&nbsp;I’m&nbsp;not&nbsp;100%.&nbsp;I&nbsp;made&nbsp;the&nbsp;changes&nbsp;in&nbsp;tandem,&nbsp;and&nbsp;it&nbsp;seems&nbsp;to&nbsp;be&nbsp;working.&nbsp;I’m&nbsp;not&nbsp;one&nbsp;to&nbsp;look&nbsp;a&nbsp;gift&nbsp;horse&nbsp;in&nbsp;the&nbsp;mouth.&nbsp;=)&nbsp;  
&nbsp;-Dustin

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [September 8, 2011, 2:13pm UTC](https://community.thinkgeo.com/t/tile-caching/7159/5 "2011-09-08T14:13:37Z")

</div>

Dustin,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;am&nbsp;glad&nbsp;to&nbsp;hear&nbsp;that&nbsp;works,&nbsp;and&nbsp;I&nbsp;also&nbsp;wish&nbsp;that’s&nbsp;only&nbsp;caused&nbsp;by&nbsp;folder&nbsp;security.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don
