Skip to content

Distributed cache clobbered by memory cache with multiple servers #3

@rnelson

Description

@rnelson

HybridCache is designed to check the memory cache then update the distributed cache, which isn't quite what I had in mind.

This presents a problem because two separate APIs in the distributed example (simulating multiple instances of an API in a cluster of some sort) have their memory cache with their own local counts and they never read from the distributed cache (Redis) when the memory one exists. This results in the two APIs constantly overwriting one another instead of relying on the Redis value.

It's possible to disable local cache (entirely, or just read, or just write) or to drastically lower its expiration to minimize the issue, but that requires knowing that we're using the IDistributedCache. I haven't found a way to determine that and want to avoid adding a configuration item.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions