WordPress.org

Ready to get started?Download WordPress

Forums

QR Code Tag
Nice, but caching is broken (13 posts)

  1. dougvdotcom
    Member
    Posted 3 years ago #

    This is a great plugin. Only one issue: The caching system doesn't quite work right.

    Basically, a new QR code image is created with every request and stored locally, every time the page is loaded. This means I had nearly 54,000 QR code images stored in the cache for a blog that only has about 200 total posts.

    It may be that the problem lies with WP-SuperCache, which I (and pretty much everyone else) use to limit server load.

    Whatever the case, and other than that problem, it works great. Fix the cache issues and it's one of the best plugins out there.

    http://wordpress.org/extend/plugins/qr-code-tag/

  2. Dennis
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Doug,

    It's not a bug - Qr Code Tag compares the complete URL (parameters included): if you reach a post by

    http://myblog/2011/mypost

    and via

    http://myblog/2011/mypost#somesection
    http://myblog/2011/mypost?sort=whatever

    qrcodetag has created 3 qrcodes...

    I'm going to add a switch that prevents this behavior.
    Regards,
    Dennis

  3. callumw
    Member
    Posted 3 years ago #

    Ditto Doug.
    I currently use it only on 1 page (contact) and every time I do a page refresh the cache increments by 1.

    I use permalinks only and no other caching, so it shouldn't be creating multiple copies.

    CW

  4. Dennis
    Member
    Plugin Author

    Posted 3 years ago #

    It shouldn't create multiple copies just by refreshing. Do you use the widget or shortcodes?

  5. callumw
    Member
    Posted 3 years ago #

    The Widget : http://c.callumw.com

  6. callumw
    Member
    Posted 3 years ago #

    I activated W3 Total cach and it's stopped it from incrementing so much.

    Still a 7 count from a single QR (I reset the cache when I posted this topic)

    C.

  7. dougvdotcom
    Member
    Posted 3 years ago #

    Like CW, I was using the widget version.

    @CW: Do you use WP-SuperCache (or another caching plugin)?

    I believe my problem was related to WP-SuperCache and the way it rewrites URLs to serve cached pages. In short, every time a page or post was accessed, WP-SuperCache would serve the cached page, but to QR Code Tag, it looked like a new page / post, so a new QR code image would be generated.

    As soon as I disabled WP-SuperCache, QR Code Tag stopped making so many versions of the same thing.

    Unfortunately, I need a good cache tool more than I need QR Codes, so I stopped using QR Code Tag shortly after creating this thread.

  8. callumw
    Member
    Posted 3 years ago #

    I wasn't using caching at the time, but since I activated W3 Total Cache it's slowed down the count....

    Working in my favour rather than against me :o)

    CW

  9. Dennis
    Member
    Plugin Author

    Posted 3 years ago #

    A QR Code is created for every URL including any parameters - thus if you may access a single page by different URLS, a qr code is created every time, e.g.:

    http://mypage.com/mypost
    http://www.mypage.com/mypost
    http://www.mypage.com/mypost?someparam
    http://www.mypage.com/mypost?someothereparams
    http://mypage.com/archive/mypost
    http://mypage.com/categories/some/mypost

    I am currently working on updating the plugin (for wordpress 3.1+) - you may then take a look at what is actually cached (URL & params) and you can now change the URL behavior from full permalink (as the current version does) to short page URL (the one with ?page=1234) which creates smaller qr codes and stops creating different qr codes for the same page.

    thanks for your reports!

    regards,
    dennis

  10. bob stevens
    Member
    Posted 3 years ago #

    I like your plugin but, am on 3.1. ;-{ Any idea on when the 3.1 version will be available?

  11. Amit_k
    Member
    Posted 3 years ago #

    you can use a simple line of code to add QR-CODE image to your post. So why you are using plugin? Just have to paste this code into wordpress loop, as the permalink is used we don't have to worry about all things (Dennis explained it in detailed)

    using some conditional statements you can restrict this from appearing on some kind of pages such as category,tags, etc.

    <img src="http://chart.apis.google.com/chart?cht=qr&chs=100x100&chl=<?php the_permalink(); ?/>" width="150" height="150" alt="QR code" />

    Above code worked fine. Who want more customization options then use "QR Code tag" this is best qr code plugin I saw on wordpress.

  12. Seb-PAME
    Member
    Posted 2 years ago #

    Hi ! I'm sorry if I'm using this topic but it's the only way to ask a question to Amit_k :

    A few months ago, you answer to a topic : anyway to add meta description to post without plugin... And you said and suggest :

    «<?php if( is_single() ) {
    <meta name="description" content="<?php the_excerpt(); ?>" />
    ?>
    Above code will add meta description to posts only, This will show first 55 words If you are not writing excerpt manually, else it will show the content of excerpt field.»

    So, where do you add those lines ? In what template and where ?

    Thanks to answer me please !

  13. Amit_k
    Member
    Posted 2 years ago #

    @Seb-PAME

    In the header.php template between '<head></head>' tags.
    That question was asked for meta_description for posts , so I used the conditional tag to restrict the process to single posts only. If you want to add specific meta-description, keywords, titles for your posts, pages, category archives etc then use SEO for WordPress plugin by yoast.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic