aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Services/UserAvatarService.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-03-13 18:09:50 +0800
committerGitHub <noreply@github.com>2020-03-13 18:09:50 +0800
commit067ef1edcb4409feda25a9356d49b146a9fd884b (patch)
tree23167ac72ad2a0a878eacbfec7fdd9b8b4a81c55 /Timeline/Services/UserAvatarService.cs
parent904f98bda60b3bd92331aacde3771dedde62d2b5 (diff)
parent1af4f51abcd09be68bc0e2ad77b163569a50a6b3 (diff)
downloadtimeline-067ef1edcb4409feda25a9356d49b146a9fd884b.tar.gz
timeline-067ef1edcb4409feda25a9356d49b146a9fd884b.tar.bz2
timeline-067ef1edcb4409feda25a9356d49b146a9fd884b.zip
Merge pull request #71 from crupest/cache
Add cache support for timeline post data.
Diffstat (limited to 'Timeline/Services/UserAvatarService.cs')
-rw-r--r--Timeline/Services/UserAvatarService.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Timeline/Services/UserAvatarService.cs b/Timeline/Services/UserAvatarService.cs
index 1b1be698..3ab8f14d 100644
--- a/Timeline/Services/UserAvatarService.cs
+++ b/Timeline/Services/UserAvatarService.cs
@@ -22,6 +22,11 @@ namespace Timeline.Services
{
public Avatar Avatar { get; set; } = default!;
public DateTime LastModified { get; set; }
+
+ public CacheableData ToCacheableData()
+ {
+ return new CacheableData(Avatar.Type, Avatar.Data, LastModified);
+ }
}
/// <summary>