Fortunately this post is not expired :D It's a good question gt1974 (really brainstorming) Caching is good but it creates a file on disk that can become big if you have a lot of URLs to keep or expire. If this file is removed (by you, an admin, system...), the logic will change and can be "dangerous" because the file will be recreated again (on open) and maybe filled or not (and this could be problematic). So I think that caching is not so good for this functionnality. But if you use caching, take a look at Cache::FastMmap it's really quick and easy to use. Adding something to the url is not so good too because the user can change it and you have to manage it. The real question is: how much URLs do you have to expire? Why don't you just remove, rename or move the page by a job? A 404 error will be generated and could be managed by your web server. If you don't want that someone access your pages, remove it :D but maybe that you are talking about URLs to populate your pages (or db) with data (JSON...), in that case of course you can't remove them. Peace

In reply to Re: Expire URL by hotchiwawa
in thread Expire URL by gt1974

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.