• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Cache and Drupal
 

Cache and Drupal

on

  • 2,032 views

I spoke about the cache layer of Drupal at the University of Szeged.

I spoke about the cache layer of Drupal at the University of Szeged.

Statistics

Views

Total Views
2,032
Views on SlideShare
2,024
Embed Views
8

Actions

Likes
0
Downloads
7
Comments
0

4 Embeds 8

http://www.slideshare.net 5
http://coderwall.com 1
http://www.linkedin.com 1
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Cache and Drupal Cache and Drupal Presentation Transcript

    • Cache a Drupalban
    • A cache (pronounced /kæʃ/ ) is a collection of data duplicating original values Stored elsewhere or computed earlier, where the original data is expensive to fetch (owing to longer access time) or to compute, compared to the cost of reading the cache. Wikipedia
    •  
    •  
    •  
    • Op code caches
      • APC
      • Eaccelerator
      • XCache
      • IonCube
      • Turck MMCache
      • Nusphere PhpExpress
      • Zend Optimizer+
      • Zend Platform
    • function node_load( $param = array() , $revision = NULL , $reset = NULL ) { static $nodes = array() ; if ( $reset ) { $nodes = array() ; } … if ( isset ( $nodes [ $param ])) { return is_object( $nodes [ $param ]) ? drupal_clone( $nodes [ $param ]) : $nodes [ $param ]; } … return $node ; }
    • cache_get( $cid , $table = 'cache' ) cache_set( $cid , $data , $table = 'cache' , $expire = CACHE_PERMANENT, $headers = NULL )
      • cache
      • cache_block
      • cache_content
      • cache_filter
      • cache_form
      • cache_menu
      • cache_page
      • cache_update
    • +------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+---------+-------+ | cid | varchar(255) | NO | PRI | | | | data | longblob | YES | | NULL | | | expire | int(11) | NO | MUL | 0 | | | created | int(11) | NO | | 0 | | | headers | text | YES | | NULL | | | serialized | smallint(6) | NO | | 0 | | +------------+--------------+------+-----+---------+-------+
    • function mymodule_schema() { $schema = array() ; $schema [ 'cache_mymodule' ] = drupal_get_schema_unprocessed( 'system' , 'cache' ); $schema [ 'cache_mymodule' ][ 'description' ] = '' ; return $schema ; }
    • Cache Router
      • APC
      • Database
      • eAccelerator
      • File
      • Memcache
      • Memcached (Alpha)
      • XCache
    • Memcache