• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFCache dynamic user content and flush whole region or specific cache object ids.

New Here ,
Nov 11, 2016 Nov 11, 2016

Copy link to clipboard

Copied

Hi there... looking through the documentation I am currently having difficulty working out the standard way of achieving my requirements.

I have a menu which is dynamic depending on the user and I would like to cache it.

I would then like to be able to either flush the cache for a specific user or for all users at once.

I was hoping I could wrap the navigation cfml in a cfcache tag such as

<cfcache key="NavCache" id="id#USERID#"   >

    #NAVHTML#

</cfcache>

I could then use the cacheRemoveAll function to clear the "NavCache" region and up this point everything is working great.

The problem occurs when I then attempt to flush a specific cache object by id.

I have tried cacheRemove method and the <cfcache> tag with the action="flush" attribute....however I have had no success.

First off... am I going about this in the wrong way ?

If I am along the right lines... what am I doing wrong?

Thanks very much

Views

176

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation