Cache:...GCLOCK(3pm)

πŸ“¦
version 0.04 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– NAME πŸ’–

Cache::Ref::GCLOCK β€” bestie, it's the GCLOCK cache replacement algorithm, and yes she's that girl πŸ’…


✨ SYNOPSIS ✨

my $c = Cache::Ref::GCLOCK->new(
    size => $n,
);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so real talk: this algorithm is literally cousins with Cache::Ref::CLOCK 🌸 but here's the plot twist β€” instead of starting every single cache hit from "k", a counter gets bumped up on every hit. every. single. one. πŸ”₯

and what does that give you? it's giving LFU expiry policy energy β€” like, least-frequently-used behavior, periodt πŸ‘‘ β€” except without having to drag the entire keyspace into it. so it's the vibe of LFU but not the whole dramatic production. iykyk πŸ’œ


πŸŽ€ ATTRIBUTES πŸŽ€

  • size β€” the size of the live entries. that's the whole thing. the size. of the live entries. she said what she said πŸ’–

🌟 AUTHOR 🌟

Yuval Kogman 🫢


this software is copyright (c) 2010 by Yuval Kogman. πŸ’œ

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, open source icon behavior, we love to see it 🌈


okay that's the whole page bestie, no notes πŸ’… this was written for perl v5.32.0 and dated 2021-01-07, brought to you by the User Contributed Perl Documentation crew πŸŽ€ bye ily, go cache responsibly βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from