From 38686d81285984ad53ca43d2f82eb71cd45f740b Mon Sep 17 00:00:00 2001 From: xpnas Date: Sat, 27 Mar 2021 00:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inotify/Data/DBManager.cs | 2 +- Inotify/Dockerfile | 2 +- Inotify/Sends/SendCacheStore.cs | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Inotify/Data/DBManager.cs b/Inotify/Data/DBManager.cs index 46f92d5..a5b93d2 100644 --- a/Inotify/Data/DBManager.cs +++ b/Inotify/Data/DBManager.cs @@ -22,7 +22,7 @@ namespace Inotify.Data private readonly Migrator m_migrator; - private readonly string m_dataPath = "im_data"; + private readonly string m_dataPath = "inotify_data"; private readonly string m_jwtPath; diff --git a/Inotify/Dockerfile b/Inotify/Dockerfile index 2f62199..f42cce6 100644 --- a/Inotify/Dockerfile +++ b/Inotify/Dockerfile @@ -1,7 +1,7 @@ #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base -VOLUME ["/im_data"] +VOLUME ["/inotify_data"] WORKDIR /app EXPOSE 80 EXPOSE 443 diff --git a/Inotify/Sends/SendCacheStore.cs b/Inotify/Sends/SendCacheStore.cs index d356091..4b9d5d9 100644 --- a/Inotify/Sends/SendCacheStore.cs +++ b/Inotify/Sends/SendCacheStore.cs @@ -5,6 +5,7 @@ using Inotify.Sends; using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.Caching; using System.Text; using System.Web; @@ -12,13 +13,13 @@ namespace Inotify.Sends { public class SendCacheStore { - private static readonly System.Runtime.Caching.MemoryCache m_cache; + private static readonly MemoryCache m_cache; private static readonly Dictionary m_systemInfos; static SendCacheStore() { - m_cache = new System.Runtime.Caching.MemoryCache("CacheStore"); + m_cache = new MemoryCache("CacheStore"); m_systemInfos = DBManager.Instance.DBase.Query().ToList().ToDictionary(e => e.key, e => e.Value); }