Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dylan Kuhn

    (@cyberhobo)

    Google caches KML files, and recommends doing exactly what you’ve done:

    https://code.google.com/p/gmaps-api-issues/issues/detail?id=4196

    Geo Mashup doesn’t try to cache custom.js – it should be handled the same as other javascript files.

    Thread Starter jamesinealing

    (@jamesinealing)

    Aghhhh, face-palm. Sorry, it’s been a year or more since I worked with Google Maps and loading kml!

    I’ve just implemented a couple of lines in custom.js

    var cachetime = 180;  //desired cache time in seconds
    var param = Math.round(+new Date()/1000/cachetime);

    and then append ?t= + the value of param onto the kml call – I thought I wouldn’t overwrite the caching entirely. Seems to work well now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is external kml loaded through custom.js cached?’ is closed to new replies.