rabbah commented on a change in pull request #2624: Add cache invalidation
between controllers
URL:
https://github.com/apache/incubator-openwhisk/pull/2624#discussion_r135627008
##########
File path:
common/scala/src/main/scala/whisk/core/database/MultipleReadersSingleWriterCache.scala
##########
@@ -287,19 +294,25 @@ trait MultipleReadersSingleWriterCache[W, Winfo] {
def cacheSize: Int = cache.size
+ protected[database] def removeId(key: CacheKey)(implicit ec:
ExecutionContext) = {
+ cache.remove(key).map { cacheEntry =>
+ cacheEntry.flatMap(_.unpack())
+ }
+ }
+
/**
* Log a cache hit
*
*/
- private def makeNoteOfCacheHit(key: Any)(implicit transid: TransactionId,
logger: Logging) = {
+ private def makeNoteOfCacheHit(key: CacheKey)(implicit transid:
TransactionId, logger: Logging) = {
Review comment:
these private methods which just log don't need to change the key, fwiw.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services