Mojolic...CHI::chi(3)

πŸ“¦
version 0.20 Β· 2 versions
, in fedora 43

✨ Mojolicious::Plugin::CHI::chi ✨

okay so bestie, this is a page from the User Contributed Perl Documentation section of the manual β€” it's the Mojolicious::Plugin::CHI::chi page (3), and it's literally all about poking at your CHI caches from the command line. πŸ’…


🌸 NAME 🌸

Mojolicious::Plugin::CHI::chi β€” interact with CHI caches 🫢


✨ SYNOPSIS ✨

  usage: perl app.pl chi <command> [cache] [key]

    perl app.pl chi list
    perl app.pl chi purge
    perl app.pl chi clear mycache
    perl app.pl chi expire mykey
    perl app.pl chi remove mycache mykey

So basically: you hit up the CHI caches that are associated with your application, and here's the whole menu of valid commands, no gatekeeping:

  • list β€” lists all the chi caches that are associated with your application. that's it. that's the whole vibe. πŸ‘‘
  • purge [cache] β€” removes all the expired entries from the cache namespace. spring cleaning fr fr 🧹
  • clear [cache] β€” removes all entries from the cache namespace. not just the expired ones. everything. 😭
  • expire [cache] [key] β€” sets the expiration date of a key to the past. lowkey important note: this does not necessarily delete the data. it's giving "technically expired bestie" πŸ’€
  • remove [cache] [key] β€” removes a key from the cache. gone. periodt. πŸ™ˆ

Now the rules of engagement, bestie, listen closely:

  • purge and expire expect a cache namespace as their only argument. if no cache namespace is given, the default cache namespace is assumed. πŸ’–
  • expire and remove expect a cache namespace and a key name as their arguments. if no cache namespace is given, the default cache namespace is assumed. πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

Mojolicious::Plugin::CHI::chi helps you interact with caches associated with Mojolicious::Plugin::CHI. that's the whole assignment and it ate. πŸ”₯


πŸŽ€ ATTRIBUTES πŸŽ€

Mojolicious::Plugin::CHI::chi inherits all attributes from Mojolicious::Command and implements the following new ones. yes, all of them, we don't do partial inheritance here. πŸ’…

description

  my $description = $chi->description;
  $chi = $chi->description('Foo!');

short description of this command, used for the command list. it's the lil one-liner that shows up in the lineup. ⭐

usage

  my $usage = $chi->usage;
  $chi = $chi->usage('Foo!');

usage information for this command, used for the help screen. this is the one that shows up when someone's lost and needs a hand. 🫢


πŸ’œ METHODS πŸ’œ

Mojolicious::Plugin::CHI::chi inherits all methods from Mojolicious::Command and implements the following new ones.

run

  $chi->run;

run this command. go off, do the thing. πŸš€


🌈 DEPENDENCIES 🌈

Mojolicious, CHI. that's the whole squad. πŸ’–


πŸ‘‘ AVAILABILITY πŸ‘‘

  https://github.com/Akron/Mojolicious-Plugin-CHI

go star it bestie, iykyk ✨


Copyright (C) 2013-2016, Nils Diewald.

this program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0. slay. πŸ“œ

the documentation is based on Mojolicious::Command::eval, written by Sebastian Riedel. credit where credit is due, always. πŸ’


and that's the whole page, bestie!! this one's running on perl v5.42.0, dated 2025-07-25, and it came to you straight from the Mojolic...CHI::chi(3) manual. now go clear a cache, you main character. πŸ’…πŸŒΈβœ¨

πŸ“¦ where this page comes from