You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
449 B
20 lines
449 B
using Connected.Entities.Caching;
|
|
|
|
namespace Common.Collections;
|
|
|
|
internal interface IQueueCache : IEntityCacheClient<QueueMessage, long>
|
|
{
|
|
void Update(QueueMessage message);
|
|
}
|
|
internal class QueueCache : EntityCacheClient<QueueMessage, long>, IQueueCache
|
|
{
|
|
public QueueCache(IEntityCacheContext context) : base(context, QueueMessage.CacheKey)
|
|
{
|
|
}
|
|
|
|
public void Update(QueueMessage message)
|
|
{
|
|
Set(message.Id, message, TimeSpan.Zero);
|
|
}
|
|
}
|