ThinkGeo.com    |     Documentation    |     Premium Support

Tile.clear regression in 3.0.357

I'm getting crazy with this very release.


Overlay.TileCache.ClearCache(); does no longer clear the tile folder



Patrick, 
  
   One quick question on this, is the TileCache.ReadOnly = true?  I think ReadOnly was a property we added to keep people from clearing their caches and destroying their data by accident.  If this is the problem we should have added an exception to at least you you know this would be the case.  I am not sure this is what it is but something you may be able to check quickly. 
  
 David

No, tilecache.readonly=false in my case. 
 tilecache.clear works in 3.0.453 and no longeur in 3.0.457 
  
 Patrick.

Patrick,


Sorry for the inconvinience for now.
 
I tested against the 3.0.453 & 3.0.457, both of them works fine with the ClearCache API. And I double checked the codes that only bug fixed between these two versions is for the french enviroment with Preview tile cahce not created bug reported by you.
 
Please tested the sample in attachment to see it works.
 
Thanks.
 
Yale

1376-Post6536Sample.zip (14.1 KB)

Yale, 
  
 your sample clears the tile folder in my environmnet with 453 
 your sample does not clear the tile folder in my environment  with 457 (windows 7 fr/vista fr, x64, built as x86 with vs2008) 
  
 I’m rolling back to 453 which is much stable of tile management (see my other posts on the subject where tiles are no longuer refreshed when style change) 
  
 Patrick.

Patrick, 
  
 It’s a potential bug for System.Globalization…::.CultureInfo which already exists in any version of DesktopEdition. We have fixed it totally. 
  
 The reason of 453 can clear cache but 457 can not is below: 
  
 In French environment, the decimal point is the comma ‘,’ but in English environment is a point ‘.’   
  
 The generated cache images and store on the disk, the folder name is the string represents scale, so it will be “147647947.5” and after call ClearCache, it will find the cache folder and try to parse to double. But in French environment, it can not parse to double. 
  
 Why 453 can work, because when generate folder, the name will be “147647947,5” which contains French decimal point and ClearCache can parse the “147647947,5” to double because it’s French double. 
  
 But 457 fix the generate issue, the folder‘s name will use English decimal point “147647947.5” and ClearCache can not find the folder because “147647947.5” is not double in French environment. 
  
 Now, we have fixed this kind of issue, we made every double using ‘.’ as decimal point, no matter English environment or French environment. So all doubles are uniformity, when you generate cache, clear cache and get cache, all of them. 
  
 Please let me know if I am not clear. 
  
 We are always lack of the knowledge for culture, you help us a lot and hope you can give us more suggestion make sure about that, Thank you! 
  
 Thanks. 
  
 James 


I understand and I can test this version if you need. 
  
 Patrick.

Patrick, 
  
 Thanks for your help. 
  
 We have tested in our virtual machine which is French environment by using the latest package 3.0.467, it works properly. 
  
 If you want to use this package, you can contact support@thinkgeo.com, and then we can send to you. 
  
 Please let me know if you have questions 
  
 James