Skip to content

Commit

Permalink
PRESIDECMS-2977 be more cautious around enabling cache when admin is …
Browse files Browse the repository at this point in the history
…logged in.

Only allow it when admin logged in and it is an admin request.
  • Loading branch information
DominicWatson committed Dec 11, 2024
1 parent 8775280 commit a063bb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/coldboxModifications/Controller.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ component extends="coldbox.system.web.Controller" {
);
}

var useCache = arguments.cache;
var useCache = arguments.cache && ( !_isAdminLoggedIn() || getRequestContext().isAdminRequest() );
if ( useCache ) {
var cache = getCachebox().getCache( arguments.cacheProvider );
var cacheKey = "renderViewletCache:" & arguments.event & arguments.cacheSuffix;
Expand Down

0 comments on commit a063bb8

Please sign in to comment.