Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set which setting values need to be included in cache key
- Loading branch information
1 parent
f169b10
commit d06de10
Showing
5 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
lib/open_project/avatars/patches/user_representer_patch.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module OpenProject::Avatars::Patches | ||
module UserRepresenterPatch | ||
def self.included(base) | ||
base.singleton_class.prepend ClassMethods | ||
end | ||
|
||
module ClassMethods | ||
## | ||
# Dependencies required to cache users with avatars | ||
# When the plugin is loaded, depend on its settings | ||
def avatar_cache_dependencies | ||
[Setting.plugin_openproject_avatars] | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters