You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In environments where the ajaxHeaders property needs to get updated every n minutes, there's no way to invalidate existing tiles except calling TiledImage.reset() which just removes all tiles (from cache and visually) and reloads them.
This behaviour is not too nice, as it just steals away tiles from the user's field of view for some short amount of time. Authorization tokens are often refreshed in less than 1 minute which would yield many forced and visually conceived redraws.
By relying on the tiledImage.ajaxHeaders property instead of the tile.ajaxHeaders we'd be able to change ajax headers constantly while always considering the most up to date ones. What would be the counter arguments against the following approach?
Also I didn't get what it's all about to include the token as part of the cache key. Does anyone know why it's done like this?
// Existing code:if(this.ajaxHeaders){this.cacheKey=this.url+"+"+JSON.stringify(this.ajaxHeaders);}else{this.cacheKey=this.url;}// Don't consider ajax headers as part of cache keys at all.// With this small change, caching, viewing and updating did work just fine:this.cacheKey=this.url;
Thanks in advance for any information on the topic!
The text was updated successfully, but these errors were encountered:
In environments where the ajaxHeaders property needs to get updated every n minutes, there's no way to invalidate existing tiles except calling
TiledImage.reset()
which just removes all tiles (from cache and visually) and reloads them.This behaviour is not too nice, as it just steals away tiles from the user's field of view for some short amount of time. Authorization tokens are often refreshed in less than 1 minute which would yield many forced and visually conceived redraws.
By relying on the
tiledImage.ajaxHeaders
property instead of thetile.ajaxHeaders
we'd be able to change ajax headers constantly while always considering the most up to date ones. What would be the counter arguments against the following approach?Also I didn't get what it's all about to include the token as part of the cache key. Does anyone know why it's done like this?
Thanks in advance for any information on the topic!
The text was updated successfully, but these errors were encountered: