Problem/Motivation
recently_read table gets very large with sites that have primarily anonymous traffic when "Records delete options" is set to "Count based". Despite the notice that "Older records will be removed" there doesn't seem to be a provision for this to happen in the module code.
Proposed resolution
Add a cron task that deletes old records or maybe the "count based" option to limit the number of records per user/session should be de-coupled from the process that deletes records based on how old they are. Perhaps this should be broken out into two different settings:
"Delete old records" (with the time intervals as a setting or "never") and "Records per user or session" (with the setting being the number of records to limit the user/session to)
This way a record age-limit can be configured independent of the user/session record limit.
| Comment | File | Size | Author |
|---|
Issue fork recently_read-3413604
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
samitk commentedComment #3
samitk commentedHI @nathan573,
this issue has been fixed, please review the patch.
Thanks
Samit K.
Comment #4
samitk commentedComment #5
nathan573 commentedThank you very much samit.310@gmail.com! I've tested this patch out for at least a month now and it's working.
Cheers!
Comment #6
Anonymous (not verified) commentedjernejmramor made their first commit to this issue’s fork.
Comment #9
deaom commentedThe MR is different from the provided patch as it adds the additional option for anonymous users if Count based is selected. Hiding that file.
Tested the functionality manually:
Functionality works as expected.
I changed the naming of 1 hours to 1 hour, updated phpcs indentation, renamed enitity to entity and ignored basetable (cSpell reported as an issue) and added cSpell ignore to readme for maintainers.
As the review was also requested to be done by @bostian, leaving the status to needs review, but from my POV, it can be merged.
Comment #11
Anonymous (not verified) commented@deaom I've requested review from @boshtian because I wanted someone to review my work prior to merging. Since you've tested and reviewed work done I think that additional reviews aren't needed so I'm marking this as Fixed, and will include this issue into next release. After release is published I will close this ticket.