downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

http_chunked_decode> <http_cache_etag
[edit] Last updated: Fri, 23 Mar 2012

view this page in

http_cache_last_modified

(PECL pecl_http >= 0.1.0)

http_cache_last_modifiedÖnbellekleme son değişikliğe göre yapılır

Açıklama

bool http_cache_last_modified ([ int $zaman_damgası ] )

Gönderi öğesini son değişiklik zamanına göre önbelleğe almaya çalışır.

Belirtilen değiştirgenin değeri 0'dan büyük ise, bir zaman damgası olarak ele alınır ve son değişiklik tarihi olarak gönderilir. 0 ise veya belirtilmemişse, geçerli zaman Last-Modified değeri olarak gönderilir. Negatif bir değer belirtilmişse, değer saniye cinsinden zaman aşımı süresi olarak ele alınır ve istenen son değişiklik zamanının bu süre sonunda olduğuna karar verilerek Last-Modified başlığı güncellenir ve asıl gövde gönderilir.

http.log.cache INI ayarı etkinse ve önbelleğe alma başarılı olmuşsa, önbellek günlüğüne bir günlük girdisi yazılır.

Bilginize: Bu işlev, http_send_data(), http_send_file() ve http_send_stream() işlevleri ile birlikte kullanılabilir.

Değiştirgeler

zaman_damgası

Unix zaman damgası.

Dönen Değerler

Başarı durumunda, (öğe önbelleğe alınmışsa) bir 304 Değişmedi durum kodu ile çıkar, başarısızlık durumunda ise FALSE değeriyle döner. Buradaki "çıkar"ın anlamı için http.force_exit yönergesinin açıklamasına bakınız.

Örnekler

Örnek 1 - http_cache_last_modified() örneği

5 saniyeliğine önbellekleme.

<?php
http_cache_last_modified
(-5);
printf("%s\n"http_date());
?>

Ayrıca Bakınız



add a note add a note User Contributed Notes http_cache_last_modified
from dot php dot net at brainbox dot cz 22-Feb-2011 07:18
Please note that calling this function automatically sends also following header:

Cache-Control: private, must-revalidate, max-age=0

If you want to modify the Cache-Control header as well, you must send it *after* calling http_cache_last_modified().

 
show source | credits | sitemap | contact | advertising | mirror sites