...
The problem is exactly in a way how cached urls a are deleted - right at the moment, when data is changed in database all associated cached urls are invalidated. Because the DELETE statement is used to do that all read operations (other users browsing the website) are locked out.
Solution
- instead of immediately deleting records from "CachedUrls" table (the "\kApplication::incrementCacheSerial" method) instead:
- set their "Hash" column to 0
- set their "Url" column to an empty string
- add scheduled task, that would:
- run twice per day
- delete records in "CachedUrls" table that have "Hash" equals to "0" in batches (not more then 500 urls per run)
Related Tasks
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|