CHI::D...r::Null(3pm)

πŸ“¦
version 0.61 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

CHI::Driver::Null β€” nothing is cached πŸ«₯✨

(also, hi bestie, this is the CHI::D...r::Null(3pm) page from User Contributed Perl Documentation β€” the name got cutely cropped in the header but it's literally CHI::Driver::Null, iykyk πŸ’…)


🌸 VERSION 🌸

version 0.61 ⭐


✨ SYNOPSIS ✨

use CHI;

my $cache = CHI->new(driver => 'Null');
$cache->set('key', 5);
my $value = $cache->get('key');   # returns undef

okay so watch this πŸ“ β€” you set a thing, you get a thing back, and the thing is... undef. not a bug, that's the whole point. she's serving absence. iconic. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

So this cache driver implements the full CHI interface without ever actually storing items. Like, it shows up, it does all the moves, it's fully committed to the bit β€” but nothing is ever saved. 🫢

Useful for disabling caching in an application, for example. That's the vibe: you flip over to Null and boom πŸ’₯ the caching is off but every call still works the same way. main character energy without the memory overhead fr fr.


🌈 SEE ALSO 🌈

  • CHI πŸ’œ

πŸ’œ AUTHOR πŸ’œ

Jonathan Swartz <swartz@pobox.com> πŸŽ€


This software is copyright (c) 2021 by Jonathan Swartz.

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!! no cap, no stored items, no notes. πŸ§šπŸ’«

mwah πŸ’‹ β€” brought to you by perl v5.32.1, dated 2021-10-15, and the CHI::D...r::Null(3pm) header that ran out of room. slay. ✨

πŸ“¦ where this page comes from