How does Gmap.net cache works

Topics: General
Sep 16, 2013 at 3:07 PM
I´m using the GMAP.net library in a project and I found it was a powerful tool. It´s cache facility made it a real profit to my project. Anyway, I need if someone can tell me a little bit of how it works. As far as I tested it, I can see that it pre-allocates space (in my case about 200 mb), so I started doing some test seeing how it worked, and it turns out it works really well, but in some cases I have been viewing maps that haven´t been cached. I don´t know if I have to spent some time with the position on the map so It can be cached or something like that. Does the tile cache file size increases with the time?, or it just keeps the prealocated size?.

Thanks in advance for any possible answer.
Coordinator
Sep 16, 2013 at 3:17 PM
Prealocation is +32MB if there are no empty pages left, and there is no size limit. Caching is done asynchronously with the lowest thread priority.

If you want to cache some area, you can use integrated tile prefetcher in demos.
Dec 14, 2015 at 7:50 AM
Hey radioman

I'm not sure if this thread is still open or if I have to make a new one?

Anyway, does the cache have some kind of expiry set to it? I downloaded a large are into cache during testing, then left the project alone for a few days. After running my application again the cache was empty.
Am I maybe missing a setting?
Coordinator
Dec 14, 2015 at 1:45 PM
cache has no expiration, you can clean it using MainMap.Manager.PrimaryCache.DeleteOlderThan

by default MainMap.Manager.Mode = AccessMode.ServerAndCache , meaning all downloaded tiles will be saved

maybe your mode is different, then no tiles would be saved, or maybe you closed your app too soon