Memcached::delete

(PECL memcached >= 0.1.0)

Memcached::deleteDelete an item

Beschreibung

public Memcached::delete(string $key, int $time = 0): bool

Memcached::delete() deletes the key from the server. The time parameter is the amount of time in seconds (or Unix time until which) the client wishes the server to refuse add and replace commands for this key. For this amount of time, the item is put into a delete queue, which means that it won't possible to retrieve it by the get command, but add and replace command with this key will also fail (the set command will succeed, however). After the time passes, the item is finally deleted from server memory. The parameter time defaults to 0 (which means that the item will be deleted immediately and further storage commands with this key will succeed).

Parameter-Liste

key

The key to be deleted.

time

The amount of time the server will wait to delete the item.

Rückgabewerte

Gibt bei Erfolg true zurück. Bei einem Fehler wird false zurückgegeben. The Memcached::getResultCode() will return Memcached::RES_NOTFOUND if the key does not exist.

Beispiele

Beispiel #1 Memcached::delete() example

<?php
$m 
= new Memcached();
$m->addServer('localhost'11211);

$m->delete('key1');
?>

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Slope rider

You need to be more attentive and have quicker reflexes with each run, as they become increasingly challenging and faster. Your slope rider (https ...

Geschrieben von NadiaEira am 06.01.2026 11:11:57
Forum: Ankündigungen
Slope rider

The wisdom I spent my entire thirties seeking for! red ball (https://red-ball4.com/)​ I only I had read it sooner! earn to die (https://earntodi ...

Geschrieben von sloperun am 05.01.2026 10:04:37
Forum: Ankündigungen
we become what we behold

henry stickmin (https://henrystickmin.io/)​ is a special stick figure. A passionate, lively, and energetic stick figure. we become what we behol ...

Geschrieben von sloperun am 05.01.2026 10:01:30
Forum: Ankündigungen
SEO-URLs und MySQL

Fast, fun, hilarious, and totally addictive! Once you start playing, it's hard to stop. Slope Run (https://sloperun2.io/)​ Join us today for end ...

Geschrieben von sloperun am 05.01.2026 09:58:07
Forum: SQL / Datenbanken