EF plus 的默认缓存持续时间是多少?

what is a default cache duration of EF plus?

每当我需要从缓存中检索数据时,我都会使用 FromCache() 方法。

我没有设置任何默认缓存策略,我正在使用默认情况下使用的任何 EF plus。

默认的缓存持续时间是多少?等一下?还是无限?

免责声明:我是项目的所有者Entity Framework Plus

Entity Framework 另外默认使用MemoryCache。我们不会覆盖任何东西。参见 EF+ Memory Cache

所以问题应该比较多What is the default .NET Memory Cache duration?

MSDN,好像什么都不填,默认就是InfiniteAbsoluteExpiration

If no eviction or expiration information is provided, the default is InfiniteAbsoluteExpiration, which means that items in the cache do not expire based on an absolute time. Instead, items expire only when there is memory pressure. As a best practice, you should always explicitly provide either an absolute or a siding expiration. In this walkthrough, you use an absolute expiration of 10 seconds.