Cache::Ref::Null(3pm)

πŸ“¦
version 0.04 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ NAME ✨

Cache::Ref::Null β€” bestie, this thing caches absolutely nothing. Zero. Nada. A void. πŸ’…

It's part of the Cache::Ref family, and yeah, the manual page header calls it Cache::Ref::Null(3pm) if you're keeping score. πŸŽ€


🌸 SYNOPSIS 🌸

# useful for comparing the effect of a cache compared to no
# caching without code changes:

my $c = Cache::Profile::Compare->new(
    caches => [
        Cache::Ref::Foo->new( ... ),
        Cache::Ref->Null->new,
    ],
);

okay so the whole point of this snippet is the vibe of fairness 🧚 β€” you drop the no-op cache in next to a real one so you can compare, without touching your actual code. iconic behaviour, honestly.


πŸ¦‹ DESCRIPTION πŸ¦‹

This cache implementation will cache nothing. 🫢

That's it. That's the whole personality. It's the main character of doing nothing.

It's primarily intended for testing or for comparing runtime without a cache against runtime with a cache β€” like a control group but for your benchmark, no cap. πŸ”₯

It's like Cache::Null but supports the additional methods in Cache::Ref. so it slots into your Cache::Ref-shaped hole perfectly, lowkey the most useful useless module ever. πŸ’€

ngl if you're expecting this to speed something up you're gonna have a bad time β€” it literally cannot remember anything, that's the entire bit.

πŸ‘‘ AUTHOR πŸ‘‘

Yuval Kogman ✨


This software is copyright (c) 2010 by Yuval Kogman.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the whole page, bestie πŸŽ€ β€” perl v5.32.0, dated 2021-01-07, mwah πŸ’‹

πŸ“¦ where this page comes from