diff --git a/COMCMS.Web/Models/CacheSettings.cs b/COMCMS.Web/Models/CacheSettings.cs
new file mode 100644
index 0000000..947838b
--- /dev/null
+++ b/COMCMS.Web/Models/CacheSettings.cs
@@ -0,0 +1,131 @@
+using System;
+
+namespace COMCMS.Web.Models
+{
+ ///
+ /// 缓存配置设置
+ ///
+ public class CacheSettings
+ {
+ ///
+ /// 默认过期时间(分钟)
+ ///
+ public int DefaultExpirationMinutes { get; set; } = 30;
+
+ ///
+ /// 系统配置缓存过期时间(分钟)
+ ///
+ public int SystemConfigExpirationMinutes { get; set; } = 60;
+
+ ///
+ /// 文章缓存过期时间(分钟)
+ ///
+ public int ArticleExpirationMinutes { get; set; } = 20;
+
+ ///
+ /// 产品缓存过期时间(分钟)
+ ///
+ public int ProductExpirationMinutes { get; set; } = 20;
+
+ ///
+ /// 分类缓存过期时间(分钟)
+ ///
+ public int CategoryExpirationMinutes { get; set; } = 120;
+
+ ///
+ /// 用户缓存过期时间(分钟)
+ ///
+ public int UserExpirationMinutes { get; set; } = 15;
+
+ ///
+ /// 订单缓存过期时间(分钟)
+ ///
+ public int OrderExpirationMinutes { get; set; } = 10;
+
+ ///
+ /// 是否启用响应缓存
+ ///
+ public bool EnableResponseCaching { get; set; } = true;
+
+ ///
+ /// 是否启用分布式缓存
+ ///
+ public bool EnableDistributedCaching { get; set; } = true;
+
+ ///
+ /// 获取默认过期时间跨度
+ ///
+ public TimeSpan DefaultExpiration => TimeSpan.FromMinutes(DefaultExpirationMinutes);
+
+ ///
+ /// 获取系统配置过期时间跨度
+ ///
+ public TimeSpan SystemConfigExpiration => TimeSpan.FromMinutes(SystemConfigExpirationMinutes);
+
+ ///
+ /// 获取文章过期时间跨度
+ ///
+ public TimeSpan ArticleExpiration => TimeSpan.FromMinutes(ArticleExpirationMinutes);
+
+ ///
+ /// 获取产品过期时间跨度
+ ///
+ public TimeSpan ProductExpiration => TimeSpan.FromMinutes(ProductExpirationMinutes);
+
+ ///
+ /// 获取分类过期时间跨度
+ ///
+ public TimeSpan CategoryExpiration => TimeSpan.FromMinutes(CategoryExpirationMinutes);
+
+ ///
+ /// 获取用户过期时间跨度
+ ///
+ public TimeSpan UserExpiration => TimeSpan.FromMinutes(UserExpirationMinutes);
+
+ ///
+ /// 获取订单过期时间跨度
+ ///
+ public TimeSpan OrderExpiration => TimeSpan.FromMinutes(OrderExpirationMinutes);
+ }
+
+ ///
+ /// Redis缓存配置
+ ///
+ public class RedisCacheSettings
+ {
+ ///
+ /// 连接字符串
+ ///
+ public string ConnectionString { get; set; } = "server=127.0.0.1;password=;db=2";
+
+ ///
+ /// 实例名称
+ ///
+ public string InstanceName { get; set; } = "COMCMS:";
+
+ ///
+ /// 默认数据库
+ ///
+ public int DefaultDatabase { get; set; } = 2;
+
+ ///
+ /// 连接超时时间(毫秒)
+ ///
+ public int ConnectTimeout { get; set; } = 5000;
+
+ ///
+ /// 同步超时时间(毫秒)
+ ///
+ public int SyncTimeout { get; set; } = 5000;
+
+ ///
+ /// 是否中断连接
+ ///
+ public bool AbortConnect { get; set; } = false;
+
+ ///
+ /// 连接重试次数
+ ///
+ public int ConnectRetry { get; set; } = 3;
+ }
+}
diff --git a/COMCMS.Web/Services/CacheService.cs b/COMCMS.Web/Services/CacheService.cs
new file mode 100644
index 0000000..c9e8a95
--- /dev/null
+++ b/COMCMS.Web/Services/CacheService.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using COMCMS.Common;
+using COMCMS.Web.Models;
+using Microsoft.Extensions.Options;
+using NewLife.Caching;
+using NewLife.Caching.Services;
+
+namespace COMCMS.Web.Services
+{
+ public class CacheService : ICacheService
+ {
+ private readonly NewLife.Caching.ICacheProvider _cacheProvider;
+ private readonly CacheSettings _settings;
+ private readonly string _prefix;
+
+ public CacheService(NewLife.Caching.ICacheProvider cacheProvider, IOptions settings)
+ {
+ _cacheProvider = cacheProvider;
+ _settings = settings.Value;
+ _prefix = Utils.PrefixKey ?? "comcms:";
+ }
+
+ private string BuildKey(string key) => string.Concat(_prefix, key ?? string.Empty);
+
+ public async Task GetAsync(string key)
+ {
+ return await Task.FromResult(_cacheProvider.Cache.Get(BuildKey(key)));
+ }
+
+ public async Task SetAsync(string key, T value, TimeSpan? expiration = null)
+ {
+ var expireSeconds = (int)(expiration ?? _settings.DefaultExpiration).TotalSeconds;
+ _cacheProvider.Cache.Add(BuildKey(key), value, expireSeconds);
+ await Task.CompletedTask;
+ }
+
+ public async Task RemoveAsync(string key)
+ {
+ _cacheProvider.Cache.Remove(BuildKey(key));
+ await Task.CompletedTask;
+ }
+
+ public async Task RemoveByPatternAsync(string pattern)
+ {
+ // 暂不支持模式删除,保留占位实现
+ await Task.CompletedTask;
+ }
+
+ public async Task ExistsAsync(string key)
+ {
+ var val = _cacheProvider.Cache.Get