Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367161 - Possibility to reload code type cache for all locals
Summary: Possibility to reload code type cache for all locals
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-20 04:57 EST by Christoph Thommen CLA
Modified: 2021-08-19 11:28 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Thommen CLA 2011-12-20 04:57:39 EST
Currently it is not possible to refresh a certain CodeType (or alle Code-Types) for a given locale. Also the current implementation does only unload the cache and doesn't REload the cache again. (reloadCodeTypes does actually "clear" the CodeTypeCache and not reaload!).

There should be a possibility to reload (clear and REload!) the CodeType cache for a given locale!

Reason: When you have scheduled job which clears the cache every night, the first user in every locale which connects to the system has to wait until CodeTypeCache is loaded.
Comment 1 Christoph Thommen CLA 2011-12-20 09:46:54 EST
Correction: It does actually reload the cache, but clears the other languages out.

If more than one language is refreshed, only the last-refreshed language is loaded again, all the others are cleared again.
Comment 2 Ivan Motsch CLA 2011-12-27 04:23:04 EST
This is right, it first clears the cache for each language and then reloads the calling language. The latter part could be omitted without any change in functionality but is there for performance optimization. Since the caller most likely uses the code type it is getting a code change client notification anyway and is then getting the code type which triggers the cache refresh.

In Short: When reloading a code type it is sufficient to clear the cache, since the getting of a code type re-publishes the cache.

If your use case is to load physically reload all languages you might create a scout server job that loops over all used locales and gets the code type. That way all languages are re-populated immediately. For example every night if some code relevant data is changed.
Comment 3 Christoph Thommen CLA 2011-12-27 04:42:59 EST
Solution is ok for our use case