File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
spring-context/src/main/java/org/springframework/cache/support Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,21 @@ protected final Cache lookupCache(String name) {
128
128
return this .cacheMap .get (name );
129
129
}
130
130
131
+ /**
132
+ * Dynamically register an additional Cache with this manager.
133
+ * @param cache the Cache to register
134
+ * @deprecated as of Spring 4.3, in favor of {@link #getMissingCache(String)}
135
+ */
136
+ @ Deprecated
137
+ protected final void addCache (Cache cache ) {
138
+ String name = cache .getName ();
139
+ synchronized (this .cacheMap ) {
140
+ if (this .cacheMap .put (name , decorateCache (cache )) == null ) {
141
+ updateCacheNames (name );
142
+ }
143
+ }
144
+ }
145
+
131
146
/**
132
147
* Update the exposed {@link #cacheNames} set with the given name.
133
148
* <p>This will always be called within a full {@link #cacheMap} lock
You can’t perform that action at this time.
0 commit comments