Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Gaskell 59 posts 142 karma points
    Aug 03, 2012 @ 10:47
    Chris Gaskell
    0

    Macro Cache. Support for device.

    Hi,

    So I'm writing a site that supports desktop, tablet and mobile. We've put a framework in place using the 51 degrees foundation and masterpages to help bring in an adaptive chrome high up the template inheritence path.

    I'm now thinking about the macros and how these will behave when served to different devices. Using ImageResizer.net I have created some presets to serve the same image at different sizes and again hooking into 51 degrees I can send the correct size image based on device.

    Trouble is I want to use the umbraco macro cache but I want to maintain a cache by device (that is my abstraction of device [desktop, tablet, mobile]). So I really need to add a custom caching attribute along the lines of 'cache by device'. I realise I could probably hook it up to cache by user-agent http header using Matts blog post http://blog.mattbrailsford.com/2011/02/01/caching-an-umbraco-macro-by-querystring-parameter/ as a reference.

    Just wondered if anyone else had tried the same thing and had come up with a solution.

    Cheers

     

  • Dan 1288 posts 3921 karma points c-trib
    Aug 03, 2012 @ 11:00
    Dan
    0

    Hi Chris,

    I'm not sure if it would do exactly what you need, nor if it's finished enough for release, but at a recent 'umBristol' meet-up the guys at MayflyMedia demo'd a custom caching plug-in they'd developed which lets you configure macro caching by means other than by page.  Might be worth having a chat with them...

Please Sign in or register to post replies

Write your reply to:

Draft