91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

監(jiān)控memcache進(jìn)程,如果關(guān)掉自動重啟

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?Enyim.Caching;
using?Enyim.Caching.Memcached;



namespace?WindowsFormsApplication2
{
????///?
????///?CacheHelper
????///?

????[Serializable]
????public?class?CacheHelper
????{
????????private?static?readonly?MemcachedClient?CacheClient?=?new?MemcachedClient();

????????///?
????????///?Retrieve?cached?item
????????///?

????????///?Type?of?cached?item
????????///?Name?of?cached?item
????????///?Cached?item?as?type
????????public?static?T?Set(string?key?T?objectToCache)?where?T?:?class
????????{
????????????try
????????????{
????????????????bool?status?=?false;
????????????????if?(Get(key)?==?null)
????????????????{
????????????????????status?=?CacheClient.Store(StoreMode.Set?key?objectToCache);
????????????????}
????????????????else
????????????????{
????????????????????status?=?CacheClient.Store(StoreMode.Replace?key?objectToCache);
????????????????}
????????????????if?(status?==?false)
????????????????{
????????????????????return?null;
????????????????}
????????????????return?objectToCache;
????????????}
????????????catch
????????????{
????????????????return?null;
????????????}
????????}
????????public?static?object?Set(string?key?object?objectToCache)
????????{
????????????try
????????????{
????????????????bool?status?=?false;
????????????????if?(Get(key)?==?null)
????????????????{
????????????????????status?=?CacheClient.Store(StoreMode.Set?key?objectToCache);
????????????????}
????????????????else
????????????????{
????????????????????status?=?CacheClient.Store(StoreMode.Replace?key?objectToCache);
????????????????}
????????????????if?(status?==?false)
????????????????{
????????????????????return?null;
????????????????}
????????????????return?objectToCache;
????????????}
????????????catch
????????????{
????????????????return?null;
????????????}
????????}
????????public?static?bool?CAS(string?key?object?objectToCacheulong?ver)
????????{
????????????CasResult?status;
????????????try
????????????{

????????????????status?=?CacheClient.Cas(StoreMode.Set?key?objectToCachever);
????????????????return?(bool)status.Result;
????????????}
????????????catch
????????????{
????????????????return?false;
????????????}
????????}

????????///?
????????///?Retrieve?cached?item
????????///?

????????///?Type?of?cached?item
????????///?Name?of?cached?item
????????///?Cached?item?as?type
????????public?static?T?Get(string?key)?where?T?:?class
????????{
????????????try
????????????{
????????????????return?(T)CacheClient.Get(key);
????????????}
????????????catch
????????????{
????????????????return?null;
????????????}
??????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-01-31?10:31??MemCachedWatch\
?????目錄???????????0??2019-01-31?16:33??MemCachedWatch\MemCachedWatch\
?????文件????????6332??2019-01-23?07:58??MemCachedWatch\MemCachedWatch\CacheHelper.cs
?????文件????????3750??2019-01-31?16:56??MemCachedWatch\MemCachedWatch\Form1.Designer.cs
?????文件????????3124??2019-02-01?07:47??MemCachedWatch\MemCachedWatch\Form1.cs
?????文件???????57565??2019-01-31?16:56??MemCachedWatch\MemCachedWatch\Form1.resx
?????文件????????4307??2019-01-31?16:44??MemCachedWatch\MemCachedWatch\MemCachedWatch.csproj
?????文件?????????227??2019-01-31?11:05??MemCachedWatch\MemCachedWatch\MemCachedWatch.csproj.user
?????文件?????????495??2019-01-31?10:31??MemCachedWatch\MemCachedWatch\Program.cs
?????目錄???????????0??2019-01-31?10:31??MemCachedWatch\MemCachedWatch\Properties\
?????文件????????1378??2019-01-31?10:31??MemCachedWatch\MemCachedWatch\Properties\AssemblyInfo.cs
?????文件????????2868??2019-01-31?11:05??MemCachedWatch\MemCachedWatch\Properties\Resources.Designer.cs
?????文件????????5612??2019-01-31?10:31??MemCachedWatch\MemCachedWatch\Properties\Resources.resx
?????文件????????1114??2019-01-31?11:05??MemCachedWatch\MemCachedWatch\Properties\Settings.Designer.cs
?????文件?????????249??2019-01-31?10:31??MemCachedWatch\MemCachedWatch\Properties\Settings.settings
?????文件?????????985??2019-02-01?07:40??MemCachedWatch\MemCachedWatch\app.config
?????目錄???????????0??2019-01-31?17:03??MemCachedWatch\MemCachedWatch\bin\
?????目錄???????????0??2019-01-31?16:58??MemCachedWatch\MemCachedWatch\bin\Debug\
?????文件??????153600??2018-12-20?13:09??MemCachedWatch\MemCachedWatch\bin\Debug\Enyim.Caching.dll
?????文件???????47616??2019-02-01?07:47??MemCachedWatch\MemCachedWatch\bin\Debug\MemCachedWatch.exe
?????文件?????????985??2019-02-01?07:40??MemCachedWatch\MemCachedWatch\bin\Debug\MemCachedWatch.exe.config
?????文件???????34304??2019-02-01?07:47??MemCachedWatch\MemCachedWatch\bin\Debug\MemCachedWatch.pdb
?????文件???????65536??2007-06-07?10:28??MemCachedWatch\MemCachedWatch\bin\Debug\Memcached.ClientLibrary.dll
?????文件??????234515??2018-03-01?17:24??MemCachedWatch\MemCachedWatch\bin\Debug\cygevent-2-0-5.dll
?????文件??????139283??2018-03-01?17:24??MemCachedWatch\MemCachedWatch\bin\Debug\cygevent_core-2-0-5.dll
?????文件??????108563??2018-03-01?17:24??MemCachedWatch\MemCachedWatch\bin\Debug\cygevent_extra-2-0-5.dll
?????文件???????21523??2018-03-01?17:24??MemCachedWatch\MemCachedWatch\bin\Debug\cygevent_openssl-2-0-5.dll
?????文件???????10259??2018-03-01?17:24??MemCachedWatch\MemCachedWatch\bin\Debug\cygevent_pthreads-2-0-5.dll
?????文件?????3195569??2018-03-01?17:24??MemCachedWatch\MemCachedWatch\bin\Debug\cygwin1.dll
?????文件??????294912??2017-02-14?22:11??MemCachedWatch\MemCachedWatch\bin\Debug\log4net.dll
?????文件??????181760??2018-03-01?17:24??MemCachedWatch\MemCachedWatch\bin\Debug\memcached.exe
............此處省略23個文件信息

評論

共有 條評論

相關(guān)資源