awrb commented on code in PR #1677:
URL: https://github.com/apache/karaf/pull/1677#discussion_r1005818633


##########
cache/commands/src/main/java/org/apache/karaf/cache/core/commands/Invalidate.java:
##########
@@ -0,0 +1,28 @@
+package org.apache.karaf.cache.core.commands;
+
+import org.apache.karaf.cache.api.CacheService;
+import org.apache.karaf.cache.core.commands.completers.CacheNameCompleter;
+import org.apache.karaf.shell.api.action.Action;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Completion;
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+
+@Service
+@Command(scope = "cache", name = "invalidate", description = "")
+public class Invalidate implements Action {
+
+    @Reference
+    CacheService cacheService;
+
+    @Argument(index = 0, required = true)
+    @Completion(CacheNameCompleter.class)
+    String cacheName;
+
+    @Override
+    public Object execute() throws Exception {
+        cacheService.invalidateCache(cacheName);
+        return cacheService + " invalidated";

Review Comment:
   Should be `cacheName + " invalidated";`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to