File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
BitFaster.Caching.Benchmarks/Lru Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ Microsoft.Extensions.Caching.Memory.MemoryCache exMemoryCache
66
66
[ GlobalSetup ]
67
67
public void GlobalSetup ( )
68
68
{
69
- memoryCache . Set ( key . ToString ( ) , "1" , new System . Runtime . Caching . CacheItemPolicy ( ) ) ;
70
- exMemoryCache . Set ( key , "1" ) ;
69
+ memoryCache . Set ( key . ToString ( ) , 1 , new System . Runtime . Caching . CacheItemPolicy ( ) ) ;
70
+ exMemoryCache . Set ( key , 1 ) ;
71
71
}
72
72
73
73
[ GlobalCleanup ]
@@ -147,15 +147,15 @@ public int ClassicLru()
147
147
}
148
148
149
149
[ Benchmark ( ) ]
150
- public object RuntimeMemoryCacheGet ( )
150
+ public int RuntimeMemoryCacheGet ( )
151
151
{
152
- return memoryCache . Get ( "1" ) ;
152
+ return ( int ) memoryCache . Get ( "1" ) ;
153
153
}
154
154
155
155
[ Benchmark ( ) ]
156
- public object ExtensionsMemoryCacheGet ( )
156
+ public int ExtensionsMemoryCacheGet ( )
157
157
{
158
- return exMemoryCache . Get ( 1 ) ;
158
+ return ( int ) exMemoryCache . Get ( 1 ) ;
159
159
}
160
160
161
161
public class MemoryCacheOptionsAccessor
You can’t perform that action at this time.
0 commit comments