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

(dev/core#1846) Container, ClassLoader Caches - Separate caches by ve… #18201

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

seamuslee001
Copy link
Contributor

…rsion number

Before

If you load a new version of the CiviCRM codebase, then a freshness check
should cause the container cache to reset automatically (based on the fact
that various files have new timestamps).

However, it's possible that some kind of bug or omission prevents this from working.
Many developers won't notice such a bug because they're obsessive-compulsive
about clearing caches anyway.

After

If you load a new version of the CiviCRM codebase, then it should use a new
container cache - regardless of how well the freshness check works.

5.28 port of #17740

…rsion number

Before
------

If you load a new version of the CiviCRM codebase, then a freshness check
should cause the container cache to reset automatically (based on the fact
that various files have new timestamps).

However, it's possible that some kind of bug or omission prevents this from working.
Many developers won't notice such a bug because they're obsessive-compulsive
about clearing caches anyway.

After
-----

If you load a new version of the CiviCRM codebase, then it should use a new
container cache - regardless of how well the freshness check works.
@civibot
Copy link

civibot bot commented Aug 20, 2020

(Standard links)

@civibot civibot bot added the 5.28 label Aug 20, 2020
@totten
Copy link
Member

totten commented Aug 20, 2020

Note that the original description in #17740 discussed CachedCiviContainer.XXX.php. We noticed this patch was missing from 5.28 when discussing an error report (from @adixon) about class-loading (ie CachedExtLoader.XXX.php). The classloader problem worked like:

  1. Install Civi 5.24 and FlexMailer 1.1.1
  2. Upgrade to Civi 5.28 and Flexmailer (bundled)
  3. Observe an error: Error: Class 'Civi\FlexMailer\Services' not found in flexmailer_civicrm_container() (line 147 of /var/www/html/sites/all/modules/civicrm/ext/flexmailer/flexmailer.php).
  4. This happens because CachedExtLoader.XXX.php is stale.

The mechanics of CachedCiviContainer.XXX.php and CachedExtLoader.XXX.php are extremely similar - even using the same XXX. Consequently, this patch addresses use-cases for both files.

@seamuslee001
Copy link
Contributor Author

Test Fail unrelated

@seamuslee001 seamuslee001 merged commit 0966c96 into civicrm:5.28 Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants