1
0
mirror of https://github.com/bitwarden/server synced 2025-12-31 07:33:43 +00:00

Use In-memory cache instead of custom file cache.

This commit is contained in:
Hinton
2017-10-09 18:58:59 +02:00
parent ea5213698d
commit 753496b95d
3 changed files with 20 additions and 50 deletions

View File

@@ -1,31 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading.Tasks;
namespace Icons.Models
{
[Serializable]
public class Icon
{
public byte[] Image { get; }
public string Format { get; }
public DateTime CreatedAt { get; }
public Icon(byte[] image, string format)
{
this.Image = image;
this.Format = format;
this.CreatedAt = DateTime.Now;
}
public bool HasNotExpired()
{
return CreatedAt > DateTime.Now.AddDays(-1);
}
}
}