user3675946
user3675946

Reputation: 1

Google Earth plugin - fetchKML() - How to purge cache?

I have a very similar scenario to the one described in

Note: My KML file is fetched every single second. The KML file size is ~1 MB.

When getting the KML updates the url is changed as suggested in the aforementioned thread.

var url = 'test.kml?rnd='+Math.random();

This works perfectly. On the other hand, it causes the geplugin.exe process to consume more and more memory, which leads to a crash of the plugin.

Does anyone run into the same issue? Is there a way to force GE Plugin to purge the cache?

Upvotes: 0

Views: 389

Answers (1)

Fraser
Fraser

Reputation: 17059

Is there a way to force GE Plugin to purge the cache?

AFAIK there isn't any way to clear the cache from javascript or the API.

My KML file is fetched every single second. The KML file size is ~1 MB.

Fetching a circa 1 MB kml file every second smells. How are you calling fetchKml every second and adding the data to the plugin?

Without actually seeing your code it is impossible to say what is actually happening but this sounds like the root of the problem.

On the other hand, it causes the geplugin.exe process to consume more and more memory, which leads to a crash of the plugin.

It sounds as if you are creating some objects inside a tight, never ending, loop. Running out of memory would be expected in this case.

You should probably be using Networklinks to load the kml data rather than fetchKml, but again, without seeing your code it is impossible to say.

Upvotes: 1

Related Questions