Attachments (4)
Change History (14)
by , 17 years ago
| Attachment: | WMS Plugin use CacheFiles.patch added |
|---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
The WMS patch didn't catch this, but wmsplugin\src\wmsplugin\Cache.java can be deleted once checked in.
follow-up: 4 comment:3 by , 17 years ago
Regarding this:
{{
cache.setExpire(cache.EXPIRE_MONTHLY, false);
cache.setMaxSize(70, false);
}}
Can you please make this configurable, even if only through the Einstein dialog? The WMS images I use (e.g. landsat) I'd like to never expire (unless I manually delete the cache), and I'd like to use a lot more than 70MB for caching WMS images.
follow-up: 5 comment:4 by , 17 years ago
Replying to avar:
Can you please make this configurable.
Hrm. actually there are some Main.pref calls in that code so it might implement this, but I recall trying to completely turning off caching in the old WMS plugin without luck.
follow-up: 6 comment:5 by , 17 years ago
Hrm. actually there are some Main.pref calls in that code so it might implement this, but I recall trying to completely turning off caching in the old WMS plugin without luck.
They are configurable. The "false" says that these values will be written only if they don't exist yet. With this patch applied you can customize it via cache.wmsplugin.expire (time in seconds or -1 for never) and cache.wmsplugin.maxsize (in mbytes).
That reminds me of… I'll attach a new version that catches invalid values entered via Einstein
by , 17 years ago
| Attachment: | Add CacheFiles class.patch added |
|---|
comment:6 by , 17 years ago
Replying to xeen:
Hrm. actually there are some Main.pref calls in that code so it might implement this, but I recall trying to completely turning off caching in the old WMS plugin without luck.
They are configurable. The "false" says that these values will be written only if they don't exist yet. With this patch applied you can customize it via cache.wmsplugin.expire (time in seconds or -1 for never) and cache.wmsplugin.maxsize (in mbytes).
Nice, but it looks like it doesn't understand maxsize = -1, it could be set to a very large value but then the cleanUp() routine would still waste time calculating the size of the cache.
| maxsize < 0) return;, or something like that. |
by , 17 years ago
| Attachment: | Add CacheFiles class.2.patch added |
|---|
Good catch. Implemented. Any value below 0 will do :)
comment:7 by , 17 years ago
You use pref.getInteger(), so why don't you use putInteger()?
If you need long, then adding getLong(), putLong() ist better than own code.
comment:8 by , 17 years ago
| Summary: | [PATCH] Create core cache class → [PATCH #2] Create core cache class |
|---|
Don't I have the right to be lazy?
by , 17 years ago
| Attachment: | Add CacheFiles class.3.patch added |
|---|
follow-up: 10 comment:9 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
No. YOU don't have the right to be lazy. This would kill my good opinion about you.
In r1610 and [o15185]. New plugin not yet built.
P.S. Could you try to change your eidtor, so you no longer produce trailing spaces?
comment:10 by , 17 years ago
P.S. Could you try to change your eidtor, so you no longer produce trailing spaces?
No. But I remapped some shortcuts in N++ so it auto trims on save and added a plugin for Eclipse that does just that :)



I suggest checking in the core patch first, then wait at least one week to minimize the complaints of users who don't update JOSM/plugins simultaneously and get an error message about not found classes or so.