We'll have to use 7 days expiration until we can add the
http Expires data to tiles (after API freeze)
http://wiki.openstreetmap.org/wiki/Tile_usage_policy
gboolean validate_cache = FALSE;
g_get_current_time (&now);
- g_time_val_add (&now, (-24ul * 60ul * 60ul * 1000ul * 1000ul)); // Cache expires 1 day
+ g_time_val_add (&now, (-24ul * 60ul * 60ul * 1000ul * 1000ul * 7ul)); // Cache expires 7 days
validate_cache = modified_time->tv_sec < now.tv_sec;
return validate_cache;
NULL);
g_object_set (G_OBJECT (soup_session),
"user-agent", "libchamplain/" CHAMPLAIN_VERSION_S,
- "max-conns-per-host", 8, NULL); // This is the same has Firefox
+ "max-conns-per-host", 2, NULL); // This is as required by OSM
g_object_add_weak_pointer (G_OBJECT (soup_session),
(gpointer *) &soup_session);
}