ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Caching and user data

February 13, 2012 9:30pm

Subscribe [3]
  • #1 / Feb 13, 2012 9:30pm

    Carlos Perez

    13 posts

    I was wondering if I could get an explanation of how caching works when handling dynamically generated content.

    For example, I have member data shown on pages when a user is logged in. If I were to turn caching on for a template that shows logged in user information - does that get cached? Is there a possibility another user will login, visit that page and see cached user data for another user?

    Thanks,
    Carlos

  • #2 / Feb 14, 2012 7:01pm

    Sean C. Smith

    3818 posts

    Hi Carlos,

    Another user should not see cached data related to another specific user. I looked around and found this excellent article on caching with ExpressionEngine. A quote from that article:

    A major drawback of this type of caching is that many types of dynamic content will no longer be dynamic. The exception seems to be with using conditionals and variables related to usernames. In a test template that I created and cached, I noticed that the username would change depending on who was logged in, and the “if logged_out” conditional was respected,

    Is there anything else I can assist you with?

    Sean

  • #3 / Feb 15, 2012 11:41am

    Carlos Perez

    13 posts

    Thanks Sean - it’s a helpful article. My only true concern left is what is the truly official stance on this from Ellis Labs? The article shows his findings based on his tests, but is EE designed to never cache user information?

  • #4 / Feb 17, 2012 7:23pm

    Sean C. Smith

    3818 posts

    Hi Carlos,

    I’ll check in with others and get back to you with an official answer.

    Sean

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases