0
This is PHP file to print date time
This is PHP file to print date time
<?php print date('D, d M Y H:i:s T'); ?>Browser to: http://localhost/date.php ---------------------------------------------------------------------------------- you see that page is cached after 3 calls, if you setup cache rules in web.config CACHING INTRICACIES Even if you enable Output Caching, IIS does not immediately cache a request. It must be requested a few times before IIS considers a request to be "cache worthy". Cache worthiness can be configured via the ServerRuntime section described in this MSDN article. http://msdn.microsoft.com/en-us/library/ms690574 By default, when you create a cache rule a page is cached when it is requested 2 times within a 10 second time period. You can change these default values by first making a change to your applicationHost.config file and then updating your web.config file. Your applicationHost.config file is typically in the c:\Windows\System32\inetsrv\config directory and is most easily opened with Notepad from a command prompt with administrator privileges. In that file, find the following entry (a child of theelement): . Change Deny to Allow and save the file. and finally to view the files in cache following command should be run netsh http show cachestate Refrence<sectionGroup name="system.webServer"> <section name="serverRuntime" overrideModeDefault="Allow" /> </sectionGroup>---------------------------------------------------------------------------------- Then in web.config Refrence <configuration> <system.webServer> <serverRuntime frequentHitThreshold="3" frequentHitTimePeriod="00:00:20" /> <caching> <profiles> <add extension=".php" policy="DontCache" kernelCachePolicy="CacheForTimePeriod" duration="00:05:30" /> </profiles> </caching> </system.webServer> </configuration>
Post a Comment