U4-9972 - The "Remove" method in "DistributedCache" only supports numeric IDs

Created by Anders Bjerner 31 May 2017, 13:07:14 Updated by Anders Bjerner 31 May 2017, 13:07:14

In the DistributedCache class, we can refresh objects based on a either a numeric ID or a GUID through the Refresh method like this:

DistributedCache.Instance.Refresh(DomainsCacheRefresher.CacheRefresherId, 42);
DistributedCache.Instance.Refresh(DomainsCacheRefresher.CacheRefresherId, new Guid("1ff2f7e4-0f86-44c6-a774-9ae52c76db64"));

The corresponding Remove method only supports a numeric ID like:

DistributedCache.Instance.Remove(DomainsCacheRefresher.CacheRefresherId, 42);

but not a GUID like:

DistributedCache.Instance.Remove(DomainsCacheRefresher.CacheRefresherId, new Guid("1ff2f7e4-0f86-44c6-a774-9ae52c76db64"));

Is this by design? We might have objects that don't have numeric IDs, in which case the Remove method can't be used as it doesn't support a GUID.

If this is an "oversight", I'd be happy to add an overload that supports a GUID ;)

I'm currently developing against Umbraco 7.5.2, but this doesn't seem to have changed when looking at the latest source code on GitHub.

Comments

Priority: Normal

Type: Bug

State: Submitted

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: