Skip to content

Some questions about the behavior of AddInternal function #390

@xingwen1987

Description

@xingwen1987

As I understand it, if user add a cache to the CacheManager, the CacheManager should add cache item to each handle.

But the current implementation only add cache item into the last registered handle. [code here]

Here is a scenario, ServiceA is a cache write service, which registers a RuntimeCacheHandle and multiple RedisCacheHandle (Redis1 ~ Redis5) to write, and ServiceB is a cache read service, which registers a RuntimeCacheHandle and one RedisCacheHandle (Redis1).

if ServiceA use AddOrUpdate method to add a cache item, according to the current code logic, this cache item only write to Redis5, When ServiceB wants to get the cache item written by ServiceA from Redis1, this cache not exist because ServiceA not add this cache into Redis1.

I want to understand the intention of this design, looking forward to your reply.

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