Limited cached url deleting operations.
Details
Details
With Memcache enabled
- Delete all records from CachedUrls table
- Visit Privacy Policy page on front-end
- Confirm that record for Privacy Policy is created in the CachedUrls table
- Go to adm.console, Configuration → Website → Scheduled Tasks section
- Run populate_url_unit_cache scheduled task
- Go to Tools → System Tools section
- In the Memory Cache subsection confirm, that cached_urls_unit_prefixes cache variable contains array with c, lang, theme prefixes
- Go to adm.console, Website & Content → Structure & Data section, make some changes to the Privacy Policy category and save these changes
- Confirm that record for Privacy Policy is deleted from the CachedUrls table
- Go to Website & Content → Links section and create some active link record
- Go to recently created link page on front-end
- Confirm that record for this link page is created in the CachedUrls table
- Go to Website & Content → Links section, make some changes to the just created link and save these changes
- Confirm that record for recently created link is not deleted from the CachedUrls table
With Memcache disabled
- Delete all records from CachedUrls table
- Visit Privacy Policy page on front-end
- Confirm that record for Privacy Policy is created in the CachedUrls table
- Go to adm.console, Configuration → Website → Scheduled Tasks section
- Run populate_url_unit_cache scheduled task
- Confirm, that in the SystemCache table is created record with VarName = cached_urls_unit_prefixes and Data containing serialized array with c, lang, theme prefixes
- Go to adm.console, Website & Content → Structure & Data section, make some changes to the Privacy Policy category and save these changes
- Confirm that record for Privacy Policy is deleted from the CachedUrls table
- Go to Website & Content → Links section and create some active link record
- Go to recently created link page on front-end
- Confirm that record for this link page is created in the CachedUrls table
- Go to Website & Content → Links section, make some changes to the just created link and save these changes
- Confirm that record for recently created link is not deleted from the CachedUrls table
Diff Detail
Diff Detail
- Repository
- rINP In-Portal
- Branch
- /in-portal/branches/5.2.x
- Lint
Lint Errors Excuse: Full files re-formatting is not part of this task. Severity Location Code Message Error core/kernel/managers/cache_manager.php:802 PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace Error core/kernel/managers/cache_manager.php:802 PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace Error core/kernel/managers/cache_manager.php:819 PHPCS.E.CodingStandard.Commenting.InlineComment.InvalidEndChar CodingStandard.Commenting.InlineComment.InvalidEndChar Error core/kernel/managers/cache_manager.php:819 PHPCS.E.CodingStandard.Commenting.InlineComment.NotCapital CodingStandard.Commenting.InlineComment.NotCapital Error core/units/admin/admin_config.php:32 PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeyword CodingStandard.Arrays.Array.SpaceAfterKeyword Error core/units/admin/admin_config.php:32 PHPCS.E.Generic.PHP.LowerCaseKeyword.Found Generic.PHP.LowerCaseKeyword.Found Error core/units/admin/admin_events_handler.php:1230 PHPCS.E.CodingStandard.NamingConventions.ValidFunctionName.ScopeNotCamelCaps CodingStandard.NamingConventions.ValidFunctionName.ScopeNotCamelCaps Error core/units/admin/admin_events_handler.php:1254 PHPCS.E.CodingStandard.Classes.ClassDeclaration.NewlinesAfterCloseBrace CodingStandard.Classes.ClassDeclaration.NewlinesAfterCloseBrace - Unit
No Unit Test Coverage - Build Status
Buildable 915 Build 915: arc lint + arc unit
Event Timeline
Comment Actions
I've found one use case, that wasn't covered by initial plan.
core/kernel/managers/cache_manager.php | ||
---|---|---|
803–807 | Use construct similar to one from \kUnitConfigReader::includeConfigFiles method (getting part) to use database cache, when memory cache isn't available. When memory cache is disabled, then cache of urls from non-default units (e.g. links and products) won't ever be removed. | |
core/units/admin/admin_events_handler.php | ||
1246 | Use construct similar to one from \kUnitConfigReader::includeConfigFiles method (setting part) to use database cache, when memory cache isn't available. When memory cache is disabled, then cache of urls from non-default units (e.g. links and products) won't ever be removed. |