{"action":"created","issue":{"url":"https://api.github.com/repos/gwaldron/osgearth/issues/592","labels_url":"https://api.github.com/repos/gwaldron/osgearth/issues/592/labels{/name}","comments_url":"https://api.github.com/repos/gwaldron/osgearth/issues/592/comments","events_url":"https://api.github.com/repos/gwaldron/osgearth/issues/592/events","html_url":"https://github.com/gwaldron/osgearth/issues/592","id":58881008,"number":592,"title":"maxAge ignored for FileSystemCache","user":{"login":"hwiesmann","id":518892,"avatar_url":"https://avatars.githubusercontent.com/u/518892?v=3","gravatar_id":"","url":"https://api.github.com/users/hwiesmann","html_url":"https://github.com/hwiesmann","followers_url":"https://api.github.com/users/hwiesmann/followers","following_url":"https://api.github.com/users/hwiesmann/following{/other_user}","gists_url":"https://api.github.com/users/hwiesmann/gists{/gist_id}","starred_url":"https://api.github.com/users/hwiesmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwiesmann/subscriptions","organizations_url":"https://api.github.com/users/hwiesmann/orgs","repos_url":"https://api.github.com/users/hwiesmann/repos","events_url":"https://api.github.com/users/hwiesmann/events{/privacy}","received_events_url":"https://api.github.com/users/hwiesmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-25T10:30:05Z","updated_at":"2015-02-25T14:43:03Z","closed_at":null,"body":"Although you can set a max age for a file system cache it is ignored (file system cache is continuously growing):\r\n\r\n1) In image and elevation layers isExpired is tested but this leads only to loading new data instead of using the cached data.\r\n2) The method Cache::removeBin is only called in a destructor of TerrainLayer but this seems to remove only the internally used cache but non of the files in the file system cache. At least non of the removal methods of file system cache is called.\r\n3) The method FileSystemCacheBin::remove is only declared and defined but nowhere used.\r\n\r\nTherefore, from the source code I cannot find any hint that the file system cache can shrink."},"comment":{"url":"https://api.github.com/repos/gwaldron/osgearth/issues/comments/75971043","html_url":"https://github.com/gwaldron/osgearth/issues/592#issuecomment-75971043","issue_url":"https://api.github.com/repos/gwaldron/osgearth/issues/592","id":75971043,"user":{"login":"gwaldron","id":326618,"avatar_url":"https://avatars.githubusercontent.com/u/326618?v=3","gravatar_id":"","url":"https://api.github.com/users/gwaldron","html_url":"https://github.com/gwaldron","followers_url":"https://api.github.com/users/gwaldron/followers","following_url":"https://api.github.com/users/gwaldron/following{/other_user}","gists_url":"https://api.github.com/users/gwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/gwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwaldron/subscriptions","organizations_url":"https://api.github.com/users/gwaldron/orgs","repos_url":"https://api.github.com/users/gwaldron/repos","events_url":"https://api.github.com/users/gwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/gwaldron/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T14:43:03Z","updated_at":"2015-02-25T14:43:03Z","body":"Please clarify: you say that \"maxAge\" is being ignored, but also that isExpired() leads to new data being loaded. These cannot both be true. isExpired() only loads new data if the cache entry is older than maxAge. In any case none of this has anything to do with the overall size of the cache. You are assuming that expired entries should be deleted, but that is not the case."}}