imap_gc

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

imap_gcLeert den IMAP-Cache

Beschreibung

imap_gc ( resource $imap , int $flags ) : bool

Säubert den Cache von Einträgen eines bestimmtes Typs.

Parameter-Liste

imap

Eine von imap_open() zurückgegebene IMAP-Verbindung.

flags

Der zu löschende Cache. Es kann eine oder eine Kombination der folgenden Konstanten sein: IMAP_GC_ELT (Nachrichten-Cacheelemente), IMAP_GC_ENV (Umschlag und Textkörper) und IMAP_GC_TEXTS (Texte).

Rückgabewerte

Gibt bei Erfolg true zurück. Im Fehlerfall wird false zurückgegeben.

Beispiele

Beispiel #1 imap_gc()-Beispiel

<?php

$mbox 
imap_open("{imap.example.org:143}""username""password");

imap_gc($mboxIMAP_GC_ELT);

?>

add a note add a note

User Contributed Notes 1 note

up
2
Anonymous
14 years ago
If you notice that you're program's memory usage is increasing (as observed using ps) while calling the imap functions, calling this function should free that memory.
To Top