Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert prevNextCache to standard Cache Defintiion format #14580

Merged
merged 2 commits into from
Jun 22, 2019

Conversation

seamuslee001
Copy link
Contributor

Overview

This is a subset of #14487 and aims to only convert the PrevNextCache to standardised Cache definition function

Before

Used deprecated cache methods

After

Used standard Cache definition methods

Technical Details

If the PR introduces noteworthy technical changes, please describe them here. Provide code snippets if necessary

Comments

To Test this, someone performing an r-run should do the following

  1. Ensure that under misc the prevNext service is SQL backed or auto.
  2. Perform a search in advanced search.
  3. Confirm that the cache key has been stored in the civicrm_cache table sensibly
  4. Open a new table and copy the Advanced search URL with cache key in it and load in new tab confirm that the advanced search pane is the same
  5. Do the same but this time with CiviCampaign Search
  6. Run an update to the civicrm_cache table altering the created_date column for the keys to be > 2 days previous from now
  7. create and run a Cli script calling CRM_Core_BAO_PrevNextCache::cleanupCache() a la
<?php
civicrm_initialize();
CRM_Core_BAO_PrevNextCache::cleanupCache();

and then verify that the cache keys you had altered in 6 are now removed from the database and the relevant rows for the same cache keys are gone from civicrm_prevnext_cache also

@civibot
Copy link

civibot bot commented Jun 18, 2019

(Standard links)

@seamuslee001
Copy link
Contributor Author

Jenkins re test this please

…ext that we also clear from civicrm_prev_next_cache if sqlBacked or just deleteItem if only deleting a single cache Key
@seamuslee001 seamuslee001 force-pushed the convert_prevnext_cache branch from 2fa25fc to febc8b3 Compare June 21, 2019 23:06
@eileenmcnaughton
Copy link
Contributor

Ran through the above & it all seemed to work....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants