delete_cache ()

Deletes a cached CFResponse object using the specified cache storage type.

Access

public

Returns

Type

Description

boolean

A value of true if cached object exists and is successfully deleted, otherwise false.

Examples

Delete a cached response from APC.

Note: This method is inherited by all service-specific classes.

// Instantiate
$sdb = new AmazonSDB();
$sdb->set_cache_config('apc');

// Delete the data
$response = $sdb->delete_cache()->list_domains();
var_dump($response);
Result:
bool(false)

Delete a cached response from the file system.

Note: This method is inherited by all service-specific classes.

// Instantiate
$sdb = new AmazonSDB();
$sdb->set_cache_config('./cache');

// Delete the data
$response = $sdb->delete_cache()->list_domains();
var_dump($response);
Result:
bool(true)

Delete a cached response from Memcache.

Note: This method is inherited by all service-specific classes.

// Instantiate
$sdb = new AmazonSDB();
$sdb->set_cache_config(array(
	array('host' => '127.0.0.1')
));

// Delete the data
$response = $sdb->delete_cache()->list_domains();
var_dump($response);
Result:
bool(true)

Source

Method defined in sdk.class.php | Toggle source view (7 lines) | View on GitHub

public function delete_cache()
{
    $this->use_cache_flow = true;
    $this->delete_cache = true;

    return $this;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback