protected function S3fsStreamWrapper::_read_cache in S3 File System 7
Same name and namespace in other branches
- 7.3 S3fsStreamWrapper.inc \S3fsStreamWrapper::_read_cache()
- 7.2 S3fsStreamWrapper.inc \S3fsStreamWrapper::_read_cache()
Fetch an object from the file metadata cache table.
Parameters
string $uri: A string containing the uri of the resource to check.
Return value
array An array of metadata if the $uri is in the cache, otherwise FALSE.
6 calls to S3fsStreamWrapper::_read_cache()
- S3fsStreamWrapper::getExternalUrl in ./
S3fsStreamWrapper.inc - Returns a web accessible URL for the resource.
- S3fsStreamWrapper::mkdir in ./
S3fsStreamWrapper.inc - Support for mkdir().
- S3fsStreamWrapper::rename in ./
S3fsStreamWrapper.inc - Support for rename().
- S3fsStreamWrapper::stream_open in ./
S3fsStreamWrapper.inc - Support for fopen(), file_get_contents(), file_put_contents() etc.
- S3fsStreamWrapper::_s3fs_get_object in ./
S3fsStreamWrapper.inc - Try to fetch an object from the metadata cache.
File
- ./
S3fsStreamWrapper.inc, line 1195 - Drupal stream wrapper implementation for S3 File System.
Class
- S3fsStreamWrapper
- The stream wrapper class.
Code
protected function _read_cache($uri) {
$this
->_debug("_read_cache({$uri}) called.", TRUE);
$record = db_select('s3fs_file', 's')
->fields('s')
->condition('uri', $uri, '=')
->execute()
->fetchAssoc();
return $record ? $record : FALSE;
}