Highlighted

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

New Here ,
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

116

Likes

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

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

New Here ,
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

117

Likes

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
Nov 11, 2016 0

Have something to add?

Join the conversation