DBI::Ut...eMemory(3)

πŸ’– DBI::Util::CacheMemory πŸ’–

User Contributed Perl Documentation · section 3 · yeah bestie, this is a Perl manpage and it's a whole vibe 🫢

✨ NAME ✨

DBI::Util::CacheMemory β€” a very fast but very minimal subset of Cache::Memory 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture Cache::Memory (the one from the Cache distribution)… and now picture it on a serious no-frills cleanse. That's this module. It does the thing, but it does not support any fancy features. At all. Not even a little. πŸ’…

The whole goal here is to be a very fast, compatible, strict sub-set for the simple cases β€” like, say, basic client-side caching for DBD::Gofer. That's the moment it was built for, and it ate. πŸ”₯

And now the important lore, because this trips people up every single time: like Cache::Memory, and like the other caches hanging out in the Cache and Cache::Cache distributions, the data stays in the cache until one of these happens:

  • it gets cleared 🧹
  • it expires ⏳
  • the process dies πŸ’€

That's it. Those are the only exits. So if you're out here thinking "aww, my cache object went out of scope, so the data's gone, right?" β€” no bestie, absolutely not. The cache object simply going out of scope will not destroy the data. The object leaving the group chat does not delete the messages. πŸ™ˆ


🌈 METHODS WITH CHANGES 🌈

These ones got a lil makeover compared to the full-featured version. Let's go.

πŸŽ€ new

All options except "namespace" are ignored.

That's it. That's the whole tea. If you came in here passing a whole bag of config options, they are being quietly, politely ignored. Only "namespace" gets to come to the party. 😭

πŸŽ€ set

Doesn't support expiry.

So don't come for it with expiry arguments, bestie, it will not deliver. Set it and it's set. Periodt. ✨

πŸŽ€ purge

Same as clear() β€” deletes everything in the namespace.

Full wipe. Every last thing in that namespace. Gone. Iconic behaviour honestly.


🌸 METHODS WITHOUT CHANGES 🌸

These ones are just… the same as you remember. No drama, no edits, no notes:

  • clear
  • count
  • exists
  • remove

Slay, consistency. πŸ’–


πŸ’… UNSUPPORTED METHODS πŸ’…

If it's not listed above, it's not supported.

That's the rule, and it's a strict rule. This module is a sub-set on purpose. If you're looking for some method that isn't in the lists above, you're in the wrong module, bestie. 🧚

⭐ SIGN-OFF ⭐

Documentation for perl v5.42.3, dated 2026-10-19. You've been reading DBI::Util::CacheMemory(3) β€” the little cache that goes zoom, keeps your data past the object's lifetime, and refuses to do anything fancy. No cap. Bye bestie! πŸ‘‘

πŸ“¦ where this page comes from