Table of Contents

Block Use Stats (User Time tracking)

Block Stack Cache Use Stats (Activity Measurement)

For very active users, the sum of the histories to be compiled for each display of the contents of the block can be very heavy to deal with for Moodle. The Use Stats block provides a display based on the actual calculation of the times as perceived by the user's traces.

If the compilation period is important, for example 90 or 180 days, the display of the block can rather slow down the site and load the server resource mobilization.

Since version 2016051500 has been added an aggregate cache to temporarily store the aggregation results of time for a given user over a given period. The cache calculates the beginning and end of the period based on the real history records. Thus, two display requests covering a distinct period, but addressing the same set of histories, may nevertheless use the cache aggregate instead of recompiling all these histories.

Cleaning and refreshing the cache

The cache is selectively cleaned by the scheduled task TTL of the aggregate cache which is set by default to 10 minutes of frequency.

The cleanup task removes hidden entries from a user who has had an activity on the site within 30 minutes of the task.

Thus, for non-active users, the cache remains in place for any new request for an extraction period for this user, based on the acquired history of this user.

For active users at the time of the request, the results are refreshed every 10 minutes (the frequency of the task).


Back to home - Back to plugin list order by type - Back to the component index - back to the technical index