【发布时间】:2012-02-13 11:52:38
【问题描述】:
我正在尝试使用看到的代码here。当我尝试执行这一行时
FieldInfo cachesInfo = cache.GetType().GetField("_caches", BindingFlags.NonPublic | BindingFlags.Instance);
cachesInfo 最终为空。我添加了一个 foreach 循环来查看对象,结果显示没有名为“_caches”的字段。
_entries
_expires
_usage
_lock
_disposed
_totalCount
_publicCount
_maxCount
_maxCountOverload
_flushUndercount
_insertBlock
_useInsertBlock
_insertBlockCalls
_utcLastTrimCompleted
_iSubCache
_cacheMultiple
_cacheCommon
我正在使用链接中的代码。我错过了什么?
(警告:我对这个问题一无所知,但我的任务是解决这个问题。我知道 cachesInfo 为空,我知道我没有看到“_caches”,但我不知道为什么)。
非常感谢您的帮助。
【问题讨论】:
标签: c# asp.net outputcache