Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^2: : get your perlmonks flair!

by gideondsouza (Pilgrim)
on Sep 23, 2013 at 14:59 UTC ( #1055306=note: print w/replies, xml ) Need Help??

in reply to Re: : get your perlmonks flair!
in thread : get your perlmonks flair!

I'm not entirely sure if I get you. Are you saying I should fetch the XP and check if it has changed? It would defeat the purpose of caching a bit. I have an extremely light server running this app and wanted to avoid the call to the site itself. is very slow, and making calls to check it everytime would be expensive.

As alternatives I was thinking of (1) A sliding cache window, if your XP updates frequently then I will cache less frequently. But this is hard because it means I have to write a varnish plugin. (2) A feature to allow users to refresh the cache for just their flair. This is slightly more do-able

If you submit it as an issue I will take this up when I can:
  • Comment on Re^2: : get your perlmonks flair!

Replies are listed 'Best First'.
Re^3: : get your perlmonks flair!
by AppleFritter (Vicar) on Apr 29, 2014 at 09:26 UTC

    A feature to allow users to refresh the cache for just their flair. This is slightly more do-able

    That would be quite useful, especially for the newly-initiated who move through the levels faster than established monks. Something like<username>.jpg?purge to force an update, perhaps?

    You may want to keep an eye on how much that's used so that people don't put too much load on the server by constantly purging their badge, of course. Alternatively, you could do some sort of rate limiting for purging as well -- say, once per day, or (if you want to allow a little more flexibility) three times per day and seven times per week.

    Thanks to both you and your friend for creating this, BTW!

      Hi AppleFritter,

      Sorry about the late reply. I've been a little off grid lately with work.

      I'll be writing another Perl web project pretty soon :)

      The problem with this purge thing is I use Varnish so to support something like a url?purge will involve writing a varnish plugin! Alternatively varnish does support sending a request with the verb as "PURGE" but I may have not enabled this.

      I gave up looking for a simple way to do this, but I'll give the whole thing another looksee soon.

      Thank you very much for your appreciation :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055306]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-03-19 01:59 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (231 votes). Check out past polls.