CHI::D...heCache(3pm)

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

πŸ¦‹ CHI::Driver::CacheCache β€” a manual page, but make it bestie πŸ’–

okay so you found a 3pm page from the User Contributed Perl Documentation section, and honestly? it's a whole vibe. this is CHI::Driver::CacheCache, it lives in the CHI family, and it is literally just a little wrapper situation. let's get into it 🫢


✨ NAME ✨

CHI::Driver::CacheCache β€” CHI wrapper for Cache::Cache

like. that's the whole personality. it wraps. that's it. that's the job πŸ’…


🌸 VERSION 🌸

version 0.61

(iconic number. no notes. πŸŽ€)


⭐ SYNOPSIS ⭐

here's the moment you've been waiting for, bestie. copy it exactly, don't freestyle:

use CHI;

my $cache = CHI->new(
    driver     => 'CacheCache',
    cc_class   => 'Cache::FileCache',
    cc_options => { cache_root => '/path/to/cache/root' },
);

look at that. clean. immaculate. the driver => 'CacheCache' is you picking this driver, cc_class is which Cache::Cache class you're wrapping, and cc_options is the hashref of stuff that class wants. slay πŸ”₯


πŸ’œ DESCRIPTION πŸ’œ

so basically: this driver wraps any Cache::Cache cache.

any of them. all of them. it's giving universal adapter energy. you bring a Cache::Cache, this driver holds it, CHI interface on the outside. no cap. ✨


πŸŽ€ CONSTRUCTOR OPTIONS πŸŽ€

when you're using this driver, you can pass the following options to CHI->new() in addition to the CHI.

(yes, that's exactly how the original says it. quoting it verbatim because i am NOT about to invent details, bestie. πŸ™ˆ)

  • cc_class β€” the name of the Cache::Cache class you want it to create, like e.g. Cache::FileCache. Required. like, actually required. you cannot skip this one, it's not optional, it's not a suggestion, it's a whole requirement πŸ’€
  • cc_options β€” a hashref of options that get passed straight to the Cache::Cache constructor. Required. also required. also not optional. bring both or bring nothing πŸ“
lowkey the pattern here is: two options, both mandatory, both about the Cache::Cache side of things. the driver is just the bridge. 🧚

🌈 SEE ALSO 🌈

  • CHI β€” the parent situation, the whole reason we're here, the main character πŸ‘‘

πŸ’– AUTHOR πŸ’–

Jonathan Swartz <swartz@pobox.com>

(thank you for your service, king 🫢)


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.

(so yes you can use it, yes you can remix it, just respect the Perl 5 terms. periodt. πŸ’…)


and that's the page, bestie!! 🌟 written by perl v5.32.1, dated 2021-10-15, straight out of the User Contributed Perl Documentation section (3pm), and now it's living rent free in your brain. go wrap a Cache::Cache. you got this. πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from