Table of Contents

Class RewardRuleService

Namespace
Dynamicweb.Ecommerce.Loyalty
Assembly
Dynamicweb.Ecommerce.dll

Reads and writes the rules of a loyalty reward, cached per reward.

public class RewardRuleService : ICacheStorage<int, ConcurrentDictionary<int, RewardRule>>, ICacheStorage<int>, ICacheStorage
Inheritance
RewardRuleService
Implements
Inherited Members

Properties

Info

Gets information about the cache holding the reward rules.

public CacheInformation Info { get; }

Property Value

CacheInformation

Methods

ClearCache()

Drops every cached reward rule.

public void ClearCache()

ClearCache(IEnumerable<int>)

Drops the cached rules of the given rewards.

public void ClearCache(IEnumerable<int> keys)

Parameters

keys IEnumerable<int>

The ids of the rewards whose rules are dropped.

ClearCache(int)

Drops the cached rules of the given reward.

public void ClearCache(int key)

Parameters

key int

The id of the reward whose rules are dropped.

SetCacheType<TObjectCache>()

Replaces the cache implementation holding the reward rules.

public void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<int, ConcurrentDictionary<int, RewardRule>>

Type Parameters

TObjectCache

The cache implementation to switch to.

To top