[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/ -> SquidPurgeClient.php (summary)

Squid and Varnish cache purging. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 484 lines (12 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 2 classes

SquidPurgeClient:: (16 methods):
  __construct()
  getSocket()
  getReadSocketsForSelect()
  getWriteSocketsForSelect()
  getIP()
  markDown()
  close()
  queuePurge()
  isIdle()
  doWrites()
  doReads()
  processReadBuffer()
  processStatusLine()
  processHeaderLine()
  nextRequest()
  log()

SquidPurgeClientPool:: (3 methods):
  __construct()
  addClient()
  run()


Class: SquidPurgeClient  - X-Ref

An HTTP 1.0 client built for the purposes of purging Squid and Varnish.
Uses asynchronous I/O, allowing purges to be done in a highly parallel
manner.

Could be replaced by curl_multi_exec() or some such.
__construct( $server, $options = array()   X-Ref

param: string $server
param: array $options

getSocket()   X-Ref
Open a socket if there isn't one open already, return it.
Returns false on error.

return: bool|resource

getReadSocketsForSelect()   X-Ref
Get read socket array for select()

return: array

getWriteSocketsForSelect()   X-Ref
Get write socket array for select()

return: array

getIP()   X-Ref
Get the host's IP address.
Does not support IPv6 at present due to the lack of a convenient interface in PHP.

return: string

markDown()   X-Ref
Close the socket and ignore any future purge requests.
This is called if there is a protocol error.


close()   X-Ref
Close the socket but allow it to be reopened for future purge requests


queuePurge( $url )   X-Ref
Queue a purge operation

param: string $url

isIdle()   X-Ref

return: bool

doWrites()   X-Ref
Perform pending writes. Call this when socket_select() indicates that writing will not block.


doReads()   X-Ref
Read some data. Call this when socket_select() indicates that the read buffer is non-empty.


processReadBuffer()   X-Ref

return: string

processStatusLine( $line )   X-Ref

param: string $line

processHeaderLine( $line )   X-Ref

param: string $line

nextRequest()   X-Ref
No description

log( $msg )   X-Ref

param: string $msg

Class: SquidPurgeClientPool  - X-Ref

__construct( $options = array()   X-Ref

param: array $options

addClient( $client )   X-Ref

param: SquidPurgeClient $client
return: void

run()   X-Ref
No description



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1