<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Loggin Cache Issue In Blog and CMS in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Loggin-Cache-Issue-In-Blog-and-CMS/m-p/1137833#M42763</link>
    <description>&lt;P&gt;Thanks for your quick reply.&lt;BR /&gt;&lt;BR /&gt;If Blog pages are fully cached then how Hubspot default page restiction is working?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Are they doing server side checking or something?&lt;BR /&gt;&lt;BR /&gt;We can't do server less concept here as we'll have paid content so it'll be risky if we do client side restrictions using javascript.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Apr 2025 07:42:17 GMT</pubDate>
    <dc:creator>BPatel1</dc:creator>
    <dc:date>2025-04-18T07:42:17Z</dc:date>
    <item>
      <title>Loggin Cache Issue In Blog and CMS</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Loggin-Cache-Issue-In-Blog-and-CMS/m-p/1137467#M42751</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We've integrated login &amp;amp; register feature in Hubspot CMS using this&amp;nbsp;g.com/_hcms/mem/login and session is working properly and getting all the data in CMS template.&lt;BR /&gt;&lt;BR /&gt;We are using&amp;nbsp;request_contact.is_logged_in to check the same but this is not working in blogs. Sometimes it's working sometime not. Also, not able to get the contact properties as well. Same sometime it works sometime now. Also, date parameters like now() not working in blog templates.&lt;BR /&gt;&lt;BR /&gt;Any ideas or solution?&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 12:14:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Loggin-Cache-Issue-In-Blog-and-CMS/m-p/1137467#M42751</guid>
      <dc:creator>BPatel1</dc:creator>
      <dc:date>2025-04-17T12:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Loggin Cache Issue In Blog and CMS</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Loggin-Cache-Issue-In-Blog-and-CMS/m-p/1137794#M42762</link>
      <description>&lt;P class=""&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/926740"&gt;@BPatel1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What you’re running into is that blog posts and blog listing pages are cached more aggressively than standard CMS pages — which is why things like request_contact.is_logged_in, now(), and contact properties can feel super unreliable on them. Sometimes you hit a fresh version and everything works... and then five minutes later it doesn’t.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;Best workaround I’ve seen is to move any login-aware logic to the client side.&lt;BR /&gt;&lt;BR /&gt;Basically, you set up a little serverless function in HubSpot that returns something like { isLoggedIn: true, firstname: 'Sarah' } and then use JavaScript on the blog template to fetch that and adjust what the user sees (show/hide sections, name, etc).&lt;BR /&gt;&lt;BR /&gt;It adds a tiny bit of complexity, but it’s way more reliable than relying on the server to guess who’s logged in on a cached page.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;If that’s too heavy right now, you could start with just showing a "manage account" link or something generic and skipping personalization until you're ready to handle it with JS + functions.&lt;BR /&gt;&lt;BR /&gt;But yeah — I’d avoid trying to force login-based content directly into the blog templates. The caching will keep making it inconsistent.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;Hope it helps.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="RubenB_0-1744951380316.png" style="width: 200px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/143721iED2010EBC2DCCCA9/image-size/small?v=v2&amp;amp;px=200" role="button" title="RubenB_0-1744951380316.png" alt="RubenB_0-1744951380316.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.linkedin.com/in/ruben-burdin/" target="_blank" rel="noopener nofollow noreferrer"&gt;Ruben Burdin&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Real-Time Data Sync Between any CRM or Database | Founder @&lt;A href="https://www.stacksync.com/" target="_blank" rel="noopener"&gt;Stacksync&lt;/A&gt; (YC W24)&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2025 04:45:58 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Loggin-Cache-Issue-In-Blog-and-CMS/m-p/1137794#M42762</guid>
      <dc:creator>RubenBurdin</dc:creator>
      <dc:date>2025-04-18T04:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Loggin Cache Issue In Blog and CMS</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Loggin-Cache-Issue-In-Blog-and-CMS/m-p/1137833#M42763</link>
      <description>&lt;P&gt;Thanks for your quick reply.&lt;BR /&gt;&lt;BR /&gt;If Blog pages are fully cached then how Hubspot default page restiction is working?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Are they doing server side checking or something?&lt;BR /&gt;&lt;BR /&gt;We can't do server less concept here as we'll have paid content so it'll be risky if we do client side restrictions using javascript.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2025 07:42:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Loggin-Cache-Issue-In-Blog-and-CMS/m-p/1137833#M42763</guid>
      <dc:creator>BPatel1</dc:creator>
      <dc:date>2025-04-18T07:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Loggin Cache Issue In Blog and CMS</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Loggin-Cache-Issue-In-Blog-and-CMS/m-p/1138207#M42776</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/926740"&gt;@BPatel1&lt;/a&gt;&amp;nbsp; totally fair question and yeah, you’re right to be cautious if you’re dealing with paid or gated content.&lt;BR /&gt;&lt;BR /&gt;So here’s how it works: even though blog pages are heavily cached, HubSpot’s &lt;STRONG&gt;default page restriction feature (the one you apply via the content settings UI)&lt;/STRONG&gt; still works because it runs at a &lt;STRONG&gt;server level before the page is served&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Basically, it’s a middleware layer that checks the visitor’s membership/session &lt;EM&gt;before&lt;/EM&gt; it hands over the cached HTML. So while you can’t rely on request_contact.is_logged_in inside the template (because that part can get cached), the restriction logic itself is enforced &lt;STRONG&gt;outside&lt;/STRONG&gt; the template — and that's why protected blog pages &lt;EM&gt;can’t be accessed&lt;/EM&gt; by someone who’s not logged in, even if the page is cached.&lt;BR /&gt;&lt;BR /&gt;That part’s secure. So yeah — if you're actually using HubSpot's native membership restrictions (via the "Access control" setting on blog posts or listings), you’re good. The caching doesn't compromise that — just the ability to personalize content &lt;EM&gt;within&lt;/EM&gt; the page.&lt;BR /&gt;&lt;BR /&gt;In your case, since this is paid content, I’d stick with server-side membership enforcement and skip the client-side JS tricks unless it’s for non-sensitive personalization like “Hi [name]”.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope it helps.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="RubenB_0-1745106302148.png" style="width: 200px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/143818i778FA574E2F9C668/image-size/small?v=v2&amp;amp;px=200" role="button" title="RubenB_0-1745106302148.png" alt="RubenB_0-1745106302148.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.linkedin.com/in/ruben-burdin/" target="_blank" rel="noopener nofollow noreferrer"&gt;Ruben Burdin&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Real-Time Data Sync Between any CRM or Database | Founder @&lt;A href="https://www.stacksync.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;Stacksync&lt;/A&gt;&amp;nbsp;(YC W24)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Apr 2025 23:46:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Loggin-Cache-Issue-In-Blog-and-CMS/m-p/1138207#M42776</guid>
      <dc:creator>RubenBurdin</dc:creator>
      <dc:date>2025-04-19T23:46:26Z</dc:date>
    </item>
  </channel>
</rss>

