Turn off cache for specific items

More
13 years 6 months ago #27455 by pshoeg
Hi there,

Is it possible to turn off cache for specific items? I have a couple of pages where I'm fetching data from a JSON file, but I have to force-refresh before the changes take place.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #27457 by ggppdk
I guess you don't mean caching done by joomla.

Is your data created by a field or is it code inside the item.php of your FLEXIcontent template?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #27466 by pshoeg
I do it two ways:

1. Code inside a FlexiContent item. Simply JavaScript fetching data from a JSON file.
2. Code inside a FlexiContent module. Also JavaScript fetching data from a JSON file.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #27478 by ggppdk
You use Javascript to fetch data ? this is done at the browser. why you want to turn off caching at the server?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #27479 by pshoeg
It seems that Joomla/FlexiContent caches the content on the page, including the data I fetch via JS.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #27481 by ggppdk
So is the problem the JS is fetching data that are a Joomla component view which is cached?

or is the problem that the JS code is using some variables that are created when FLEXIcontent item view is created, e.g. inside a FLEXIcontent item you have:
Code:
echo "<script> var data_id='".$myvar."';</script>";
and you use this to pass information to the JS code?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #27482 by pshoeg
The first problem — the JS is included in a module, that supposedly is cached.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #27485 by ggppdk
So if your JS code does not use any data variable e.g. and ID created by a field in FLEXIcontent item view, why turning off cache will help?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #27531 by pshoeg
I don't know — I was just wondering that since I load the JS inside a FlexiContent view it might be cached. But it sounds like it isn't.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #27532 by ggppdk
do you have this online, and can you describe the steps of usig it?

i don't promise anything, just to take a quick look at,

The js code get the id / information of the data to retrieve from where?

via a cookie? via a form ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save