As described in 6.5.2 Sharing Data, maintaining shared data between WAMs and WEBEVENT functions requires the data to be stored in some storage such as database or files accessible to both. The nature of browser-based applications is such that it is not always possible to know when a user has finished using the application so that appropriate clean up of shared data can be performed.
It is for this reason that all browser-based applications that require transient data to be maintained on the server need some kind of timeout mechanism to determine when this data is stale and can be cleaned up.
For this reason, when sharing data using the STDANCHOR mechanism described in 6.5.2 Sharing Data, it is recommended that a time stamp is also set on the data whenever shared data is stored or updated. This time stamp can then be used by the clean up job to determine the last time the data was used and whether is is a candidate for clean up.
If your application has some kind of "Logout" function, it is recommended that shared data clean up also occurs at this point. However, a user may not always perform a "Logout", hence a clean up mechanism is still required to ensure stale shared data is cleaned up.