dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

What size?

Open krolu opened this issue 11 months ago • 6 comments

Document doesn't specify what are the units. Is it in bytes, kilobytes, megabytes, or maybe number of items on the cache?

krolu avatar Mar 01 '24 20:03 krolu

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@krolu please specify which doc page are you referring to, else we could not answer your question

buyaa-n avatar Mar 01 '24 22:03 buyaa-n

Oh sorry, I'm using this feature for the first time and I thought it would add information about the page if i'm adding this from this page. I'm referring to https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.caching.memory.memorycacheoptions.sizelimit?view=dotnet-plat-ext-8.0#microsoft-extensions-caching-memory-memorycacheoptions-sizelimit

krolu avatar Mar 02 '24 09:03 krolu

They are intentionally unitless. Instead, they have whatever meaning the consuming cache decides to ascribe to them:

https://stackoverflow.com/a/59775139/1350209

colejohnson66 avatar Mar 05 '24 13:03 colejohnson66

@colejohnson66 now I understand, but don't you think that if you have to point to stackoverflow explanation instead of actual documentation than this means that the documentation is bad? The person that wrote explanation that you are referring to also commented below the initial question that "documentation is shockingly terrible on Size".

krolu avatar Mar 05 '24 17:03 krolu

Thank you @colejohnson66 for answering the question

@krolu agree, feel free to offer a fix

buyaa-n avatar Mar 05 '24 17:03 buyaa-n