⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Caching or refresh issue



Rensweb

Rensweb
  • profile picture
  • Member

Posted 14 May 2014 - 09:54 AM

Hi all,
 
I think I'm having an caching or refresh issue.
When I update an entry in my grocery crud and click "Update and return to list" i'll return to my list. When I then enter again the edit mode, the changes are not visible. Only after hitting the F5 button, the last changes are visible.
 
Has this something to do with caching? In previous websites with grocery crud I didn't had this problem. I'm stuck now for a few days. I hope someone can help me!
 
Thanks.
Rens

 


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 19 May 2014 - 08:51 AM

it surely seems to be caching issue.. will suggest u manage the no-caching in the header of the view.... the view where u set the output of the GC - there add the no-caching feature and that should solve the problem of yrs.

 

Happy GCing :)


Rensweb

Rensweb
  • profile picture
  • Member

Posted 19 May 2014 - 09:12 AM

it surely seems to be caching issue.. will suggest u manage the no-caching in the header of the view.... the view where u set the output of the GC - there add the no-caching feature and that should solve the problem of yrs.

 

Happy GCing :)

 

Hi Amit,
Thanks for you reply.
Do you mean that I should add:
<meta http-equiv= 'pragma' content='no-cache' /> 

to my header?

Or did you mean something else?
 
Thanks!

 


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 19 May 2014 - 14:01 PM

yes .. those sort of entries that makes a page no cache


Rensweb

Rensweb
  • profile picture
  • Member

Posted 24 June 2014 - 09:07 AM

Unfortunately this does not solve my issue :(

 

I (think I) checked all the CI cache settings and they are all disabled. But still it looks like it does not load the data directly from the database. 

 

Can this has something to do with the server? When I copy this site to my local (WAMP) server, it all works fine.

 

Hope somebody can point me in the right direction!

 

Thanks.


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 25 June 2014 - 03:06 AM

step 1 - paste out here the htaccess content

Step 2 - checkout if the server is configured with some sort of reverse proxy. If it is - it will server the content always from cache.

Step 3 - If it is not having something like a reverse proxy and still serving a lot of content from cache - it is quite possible that the server is configured to do so. In this scenario - the best option is to generate each url with a unique ID (timestamp) and with every url call - pass them in each url. That way, each url is a unique to the system and it will consider serving fresh.

 

Hope this resolves your issue of getting cached content.!!

 

Happy GCing:)


Rensweb

Rensweb
  • profile picture
  • Member

Posted 26 June 2014 - 08:08 AM

Hi Amit,

 

My htaccess (root):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^website\.eu [NC]
RewriteRule (.*) http://www.website.eu/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

There are several other htaccess files in the CI folders like application, assets, assets\grocery_crud etc.

In these htaccess files the only line is:

Deny from all

 

I've asked my hosting company if they switch on any cache memory, but they told me they didn't.

Thanks for helping me!
 


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 26 June 2014 - 16:45 PM

well the last alternative.. for you is to pass the timestamp parameter along with every url .. that should do the trick,


mdqseba

mdqseba
  • profile picture
  • Member

Posted 15 May 2021 - 15:20 PM

Hello, sorry for reviving such an old post.
 
I have the same problem... could you tell me how the timestamp is added to the url?

Is it passed when loading the view?

 
function _output($output = null)
{
        $this->load->view('/view.php',$output);    
}    

 

Tks!