Announcement

Collapse
No announcement yet.

Redis caching

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Redis caching

    I have a page I use to do some redirects:

    <mvt:assign name="l.header" value="miva_output_header( 'Status', '301 Moved Permanently' )" />

    <mvt:if expr="g.Product_Code EQ 'GO-2-EC-1501'">
    <mvt:assign name="l.header" value="miva_output_header( 'Location', 'https://www.allfrom1supply.com/system-1501-chem-bake-1-step-31.html')" />
    <mvt:elseif expr="g.Product_Code EQ 'GO-2-EC-1201'">
    <mvt:assign name="l.header" value="miva_output_header( 'Location', 'https://www.allfrom1supply.com/system-1201-one-step-direct-to-metal-door-coating.html')" />
    <mvt:elseif expr="g.Product_Code EQ 'GO-2-AXA-HGD'">
    <mvt:assign name="l.header" value="miva_output_header( 'Location', 'https://www.allfrom1supply.com/axalta-imron-polyurethane.html')" />
    <mvt:elseif expr="g.Product_Code EQ 'GO-2-EC-1202-01'">
    <mvt:assign name="l.header" value="miva_output_header( 'Location', 'https://www.allfrom1supply.com/chem-bake-8000-xlt-1-gal.html')" />
    <mvt:elseif expr="g.Product_Code EQ 'GO-2-EC-1202-05'">
    <mvt:assign name="l.header" value="miva_output_header( 'Location', 'https://www.allfrom1supply.com/chem-bake-8000-xlt-5-gal.html')" />
    <mvt:elseif expr="g.Product_Code EQ 'GO-2-EC-4001-01'">
    <mvt:assign name="l.header" value="miva_output_header( 'Location', 'https://www.allfrom1supply.com/system-401-endura-crylic-self-storage-roll-door-paint.html')" />
    <mvt:elseif expr="g.Product_Code EQ 'GO-2-EC-4001-05'">
    <mvt:assign name="l.header" value="miva_output_header( 'Location', 'https://www.allfrom1supply.com/system-401-endura-crylic-paint-to-restore-self-storage-doors.html')" />
    </mvt:if>

    I saw the Redis cache section - currently not enabled- and was wondering if this can be used to cache a page like this in memory, so that redirects would happen faster? It isn't terribly slow and this is not critical, I just see the Redis caching option and wonder if it could be used - aka fast is good, faster is better, fasterer is betterer.

    #2
    Well tried and didn't work well for me as the redirects stopped working/lost the page. Will leave well alone, alone.

    Comment


      #3
      Redis is not going to work here. As you saw when you cache the page the template logic only runs once. (when the page is cached) then its acts as if it was a static HTML page, whcih is the goal of redis. You could replace that code with URI management if those products still exist to handle the redirects for you. This would be easier to manage and remove it from template code allowing you to use redis and the redirects will still occur.
      Brennan Heyde
      VP Product
      Miva, Inc.
      [email protected]
      https://www.miva.com

      Comment


        #4
        Thanks Brennan. I may revisit this. Truthfully it works pretty well as is and it is only a small amount o products that need this special care.

        Comment

        Working...
        X