init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
33
Kreta.Job.Tasks/Cache/OrarendValtozasCache.cs
Normal file
33
Kreta.Job.Tasks/Cache/OrarendValtozasCache.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Helpers.Models;
|
||||
using Kreta.Framework.Caching;
|
||||
|
||||
namespace Kreta.Job.Tasks.Cache
|
||||
{
|
||||
public class OrarendValtozasCache : GenericCache<object>
|
||||
{
|
||||
private static readonly string orarendValtozasCache = $"{nameof(Kreta)}_{nameof(OrarendValtozasCache)}";
|
||||
|
||||
public OrarendValtozasCache(CacheManager cacheManager) : base(cacheManager, nameof(OrarendValtozasCache)) { }
|
||||
|
||||
protected string GetCacheKey(string intezmenyAzonosito)
|
||||
{
|
||||
return $"{orarendValtozasCache}_{intezmenyAzonosito}";
|
||||
}
|
||||
|
||||
public List<OrarendValtozasModel> GetOrarendValtozasok(string intezmenyAzonosito)
|
||||
{
|
||||
return (List<OrarendValtozasModel>)Get(GetCacheKey(intezmenyAzonosito)) ?? new List<OrarendValtozasModel>();
|
||||
}
|
||||
|
||||
public void AddOrUpdateOrarendValtozas(List<OrarendValtozasModel> value, string intezmenyAzonosito)
|
||||
{
|
||||
AddOrUpdate(GetCacheKey(intezmenyAzonosito), value, k => value);
|
||||
}
|
||||
|
||||
public void RemoveOrarendValtozasok(string intezmenyAzonosito)
|
||||
{
|
||||
Remove(GetCacheKey(intezmenyAzonosito));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue