Krok po koroku, pełna dokumentacja w języku polskim. Skrypty napisane w PHP są z reguły umieszczane w dokumentach tekstowych (często razem z HTML lub XHTML). Dzięki temu PHP jest podobny w założeniach do dużo starszego mechanizmu Server Side Includes[4]. PHP pozwala także na wykonywanie skryptów z linii poleceń podobnie jak Perl i Python. Jego modułowa budowa udostępnia również możliwość programowania aplikacji z interfejsem graficznym. PHP umożliwia współpracę z wieloma rodzajami źródeł danych, jak na przykład serwery relacyjnych baz danych, pliki tekstowe czy dokumenty XML.
Memcache::set() stores an item
var with key on the
memcached server. Parameter expire is expiration
time in seconds. If it's 0, the item never expires (but memcached server
doesn't guarantee this item to be stored all the time, it could be deleted
from the cache to make place for other items).
You can use MEMCACHE_COMPRESSED constant as
flag value if you want to use on-the-fly
compression (uses zlib).
Notatka: Remember that resource variables (i.e. file and connection descriptors) cannot be stored in the cache, because they cannot be adequately represented in serialized state.
keyThe key that will be associated with the item.
varThe variable to store. Strings and integers are stored as is, other types are stored serialized.
flagUse MEMCACHE_COMPRESSED to store the item compressed (uses zlib).
expireExpiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).
Przykład 2. Memcache::set() example
|
| Poprzedni | Spis treści | Następny |
| Memcache::replace | Początek rozdziału | Memcache::setCompressThreshold |
php
kontakt:praca.pozycjonowanie@gmail.com