Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: perlmonksflair.com : 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: perlmonksflair.com : get your perlmonks flair!
in thread perlmonksflair.com : 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. Perlmonks.org 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: https://github.com/gideondsouza/perlmonksflair/issues/new


Comment on Re^2: perlmonksflair.com : get your perlmonks flair!
Re^3: perlmonksflair.com : get your perlmonks flair!
by AppleFritter (Chaplain) 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 http://www.perlmonksflair.com/<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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055306]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2014-07-28 16:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (204 votes), past polls