/
[url-processing] Delay, when invalidating cached mod-rewrite urls [5.2.2-B1]

[url-processing] Delay, when invalidating cached mod-rewrite urls [5.2.2-B1]

There are 2 types of URLs in In-Portal:

  • seo url (or mod-rewrite url), e.g.  "/fancy/seo/url.html" - used on Front-End only
  • regular url, e.g. "/index.php?env=-index%3Am0--1--s-" - used on Front-End (when enabled) and in Admin Console

In-Portal only understands regular urls and therefore a translation process is used to convert seo url into regular one. The converted url is then stored into "CachedUrls" database table and contains not only seo and regular urls, but also IDs of units discovered in that URLs. These IDs are later used to delete cached urls automatically is associated data in database is changed.

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

  1. instead of immediately deleting records from "CachedUrls" table (the "\kApplication::incrementCacheSerial" method) instead:
    1. set their "Hash" column to 0
    2. set their "Url" column to an empty string
  2. add scheduled task, that would:
    1. run twice per day
    2. delete records in "CachedUrls" table that have "Hash" equals to "0" in batches (not more then 500 urls per run)

Related Tasks

INP-1759 - Getting issue details... STATUS