title: Scalacache delete from cache set up with memoizeF
body: <p>I'm using CaffeineCache together with <code>memoizeF</code> to cache the result of an operation that takes a case class as an input, like this:</p>
  <pre><code>    case class Foo(id: UUID, bar: String)
  
      implicit val myCache: CaffeineCache[Foo] =
        buildCache(cacheConfig.size) //builds the CaffeineCache
  
      def cachedOperation(foo: Foo): Future[Foo] =
        memoizeF(cacheConfig.duration) {
          // do something with foo and return it
        }
  </code></pre>
  <p>Now, in some cases I need to explicitly delete a specific element from the cache.</p>
  <p>I think I could use <code>myCache.doRemove(key)</code> but from what I see in the ScalaCache documentation, when using <code>memoizeF</code> the key will be generated <em>&quot;from the class name, the name of the enclosing method, and the values of all of the method’s parameters&quot;</em> and I don't think backwards-engineering <code>key</code> from that and using it with <code>doRemove</code> is a good idea.</p>
  <p>Is there another way of removing a specific element from the cache, if it was inserted using <code>memoizeF</code>? Or perhaps, could I in some way tell <code>memoizeF</code> to use <code>id</code> from Foo as the key instead of generating it from the class name etc (I know for certain that <code>id</code>s will be unique for every Foo instance)?</p>
  <p>Perhaps using <code>memoizeF</code> is not a good idea at all for this scenario and I should go back to inserting to the cache &quot;manually&quot;? Any input is appreciated. I've looked in the official documentation and googled around but with no luck.</p>