HTML::...ctCache(3pm)

πŸ’– NAME πŸ’–

HTML::Microformats::ObjectCache β€” it's a cache, bestie. For microformat objects. She holds onto them so nobody has to do the work twice πŸŽ€


✨ DESCRIPTION ✨

Okay so picture this: the same microformat keeps showing up in the same context, and nobody wants to parse that twice. That's literally her whole job. She prevents microformats from being parsed twice within the same context. 🫢

And no, it's not just about saving time (though, slay, efficiency queen). She also stops the occasional infinite loop from happening 😭 β€” like, actually saving you β€” and she makes sure identifiers are used consistently. Consistency is the vibe, periodt. πŸ’…

🌸 Constructor 🌸

  • $cache = HTML::Microformats::ObjectCache->new β€” makes you a brand new, empty cache. Fresh out the box, no cap. ✨

πŸ¦‹ Public Methods πŸ¦‹

  • $cache->set($context, $package, $element, $object); β€” for a given context, a package (think 'HTML::Microformats::Format::hCard') and a DOM element node, she stores an object in the cache. Tucks it in. πŸ’–
  • $object = $cache->get($context, $package, $element); β€” same deal: for a given context, a package (like 'HTML::Microformats::Format::hCard') and a DOM element node, she retrieves an object from the cache. Gets it back out. πŸŽ€
  • @objects = $cache->get_all($context, [$package]); β€” for a given context and package (e.g. 'HTML::Microformats::Format::hCard'), she retrieves a list of objects from within the cache. Not one β€” a whole list, a whole friend group. πŸ‘‘

πŸ’€ BUGS πŸ’€

Found a bug? Not the moment, but okay, please report any bugs to <http://rt.cpan.org/> πŸ›πŸ™ˆ


🌈 SEE ALSO 🌈

HTML::Microformats β€” go look at her, iykyk 🧚


πŸ‘‘ AUTHOR πŸ‘‘

Toby Inkster <tobyink@cpan.org>. Iconic. Legend. Respect. 🌟


Copyright 2008-2012 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πŸ“


πŸ”₯ DISCLAIMER OF WARRANTIES πŸ”₯

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Like, no promises at all, bestie. Take her as she is or don't. 😭


perl v5.32.1, dated 2021-09-12 β€” that's the source-and-version tea, and this lil page is HTML::...ctCache(3pm). Byeeee, go cache something πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from