Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Declined
    • Labels:
      None

      Description

      If people start implementing the cache protocol on top of external caches: Memcache, Redis, or others, an async version could make sense.

      I started toying with an AsyncCacheProtocol which for all functions returning values would take two arities, a standard one which would return an instance of IRef, a second one which would take an extra callback argument to be called with the results. This doesn't solve everything though and async versions of LRU and friends would have to be implemented.

      The alternative would be to have additional calls in CacheProtocol, such as async-has? async-lookup which would implement the 2 arity semantics and then rely on the fact that the underlying cache respects some sort of async semantics, since we cannot do that with Associative, maybe another middleman protocol CacheStorage could be used, this way, all external cache providers would have to do is implement a CacheProvider with optional asynchronous support.

      I hope at least part of this makes sense.

        Attachments

          Activity

            People

            • Assignee:
              seancorfield Sean Corfield
              Reporter:
              pyr Pierre-Yves Ritschard
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: