Skip to content

Commit c1988e3

Browse files
committed
read only cache peer based on Memcached
1 parent 554b118 commit c1988e3

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

core/Cache/ReadOnlyPeer.class.php

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
/***************************************************************************
3+
* Copyright (C) 2011 by Alexander A. Klestov *
4+
* *
5+
* This program is free software; you can redistribute it and/or modify *
6+
* it under the terms of the GNU Lesser General Public License as *
7+
* published by the Free Software Foundation; either version 3 of the *
8+
* License, or (at your option) any later version. *
9+
* *
10+
***************************************************************************/
11+
12+
/**
13+
* Memcached-based cache with read-only access.
14+
*
15+
* @ingroup Cache
16+
**/
17+
final class ReadOnlyPeer extends Memcached
18+
{
19+
public function clean()
20+
{
21+
throw new UnsupportedMethodException();
22+
}
23+
24+
public function increment($key, $value)
25+
{
26+
throw new UnsupportedMethodException();
27+
}
28+
29+
public function decrement($key, $value)
30+
{
31+
throw new UnsupportedMethodException();
32+
}
33+
34+
public function delete($index, $time = null)
35+
{
36+
throw new UnsupportedMethodException();
37+
}
38+
39+
public function append($key, $data)
40+
{
41+
throw new UnsupportedMethodException();
42+
}
43+
44+
protected function store(
45+
$method, $index, $value, $expires = Cache::EXPIRES_MINIMUM
46+
)
47+
{
48+
throw new UnsupportedMethodException();
49+
}
50+
}
51+
?>

0 commit comments

Comments
 (0)