可以在Windows服务中持续特定时间的字符串值 [英] Can a persist string value for particular time in windows service
本文介绍了可以在Windows服务中持续特定时间的字符串值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的Windows服务可以根据需要在特定时间内保持字符串值。
解决方案
您可以使用MemoryCache将字符串添加到在给定时间段后过期的缓存中时间谷歌的例子。
https://msdn.microsoft.com/en-us/library/system.runtime.caching.memorycache(v = vs.110).aspx [ ^
Can my windows service, persist string value for particular time as required.
解决方案
You can use MemoryCache to add strings to the cache that expire after a given period of time. Google for examples.
https://msdn.microsoft.com/en-us/library/system.runtime.caching.memorycache(v=vs.110).aspx[^]
这篇关于可以在Windows服务中持续特定时间的字符串值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文