Solved

problem i think with the cache and mysql

Posted on 2008-06-09
1
211 Views
Last Modified: 2008-06-09
o.k this what happens
i insert something in the mysql database
and after that i use a php script to view the thing that i inserted but it takes a 1-4 menuts for the think to apear
why is that?

i called the hosting company of my website and they told me to clear the cache
is this right?
and if it is
how do i do that?
0
Comment
Question by:mgtm3
1 Comment
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 21748650
You can send headers with your php-script so the browser reloads the page upon every call and does not local cache the content.
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past

Open in new window

0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question