Skip to content

Commit

Permalink
Merge branch 'feature/756' into 000000-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed May 13, 2016
2 parents 57e08f6 + 5f10ea3 commit fbff9f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/includes/traits/Ac/PostloadUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ public function maybeInvalidateWhenLoggedInPostload()
if (!($this->user_token = $this->userToken())) {
return; // Nothing to do in this case.
}
if ($this->applyWpFilters(GLOBAL_NS.'_invalidate_when_logged_in_postload', true) === false) {
return; // Nothing to do in this case (disabled via filter).
}
$regex = $this->assembleCachePathRegex('', '.*?\.u\/'.preg_quote($this->user_token, '/').'[.\/]');
$this->wipeFilesFromCacheDir($regex); // Wipe matching files.
}
Expand Down
3 changes: 3 additions & 0 deletions src/includes/traits/Plugin/WcpUserUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public function autoClearUserCache($user_id)
if ($this->options['when_logged_in'] !== 'postload') {
return $counter; // Nothing to do.
}
if ($this->applyWpFilters(GLOBAL_NS.'_invalidate_when_logged_in_postload', true) === false) {
return $counter; // Nothing to do in this case (disabled via filter).
}
$regex = $this->assembleCachePathRegex('', '.*?\.u\/'.preg_quote($user_id, '/').'[.\/]');
$counter += $this->wipeFilesFromCacheDir($regex); // Clear matching files.

Expand Down

0 comments on commit fbff9f2

Please sign in to comment.