1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- namespace JiaZhiQuan.Common
- {
- public static partial class CacheKeys
- {
- public const int AppVersionCacheSecs = 60 * 1;
- public static string AppVersionAndroid()
- {
- return GenerateKey("app_version:android");
- }
- public static string AppVersionIOS()
- {
- return GenerateKey("app_version:ios");
- }
- public const int AppRecommendSettingCacheSecs = 60 * 1;
- public static string AppRecommendSetting()
- {
- return GenerateKey("app_recommend_setting");
- }
- public const int AppNewsUsersCacheSecs = 60 * 1;
- public static string AppNewsUsers()
- {
- return GenerateKey("app_news_users");
- }
- public const int AppIndexBannerCacheSecs = 60 * 1;
- public static string AppIndexBanner()
- {
- return GenerateKey("app_index_banner");
- }
- public const int AppIndexBannerPostsCacheSecs = 60 * 1;
- public static string AppIndexBannerPosts()
- {
- return GenerateKey("app_index_banner_posts");
- }
- public static string AppDeviceOnLine()
- {
- return GenerateKey("app_device_online");
- }
- public const int ApiInvocationLimitCacheSecs = 60 * 60;
- /// <summary>
- /// 接口访问限制,如果次数超过5次,则封禁1小时
- /// </summary>
- public static string ApiInvocationLimit(string ip)
- {
- return GenerateKey($"api_inv_limit:{ip}");
- }
- public const int AppMallIndexBannerCacheSecs = 60 * 1;
- public static string AppMallIndexBanner()
- {
- return GenerateKey("app_mall_index_banner");
- }
- }
- }
|