Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 6df5554

Browse files
author
gimpe
committed
changes for Kohana 3.3
1 parent 9ae40b3 commit 6df5554

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
kohana-memcached
22
===============
33

4-
Kohana 3.2 module for memcached extension (not memcache).
4+
Kohana 3.3 module for memcached extension (not memcache).
55

66

77
See [config file](https://github.com/gimpe/kohana-memcached/blob/master/config/cache.php).
@@ -17,4 +17,4 @@ License:
1717
* to Remix — to adapt the work
1818

1919
### Under the following conditions:
20-
* Attribution - You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
20+
* Attribution - You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

classes/cache/memcached.php renamed to classes/Cache/Memcached.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Cache_Memcached class
5-
*
5+
*
66
* LICENSE: THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
77
* CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED
88
* BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
@@ -20,4 +20,6 @@
2020
* @license http://creativecommons.org/licenses/by/3.0/ CC BY 3.0
2121
* @link http://github.com/gimpe/kohana-memcached
2222
*/
23-
class Cache_Memcached extends Kohana_Cache_Memcached {}
23+
class Cache_Memcached extends Kohana_Cache_Memcached
24+
{
25+
}

classes/kohana/cache/memcached.php renamed to classes/Kohana/Cache/Memcached.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Kohana_Cache_Memcached class
5-
*
5+
*
66
* LICENSE: THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
77
* CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED
88
* BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
@@ -21,7 +21,7 @@
2121
* @link http://github.com/gimpe/kohana-memcached
2222
*/
2323
class Kohana_Cache_Memcached extends Cache
24-
{
24+
{
2525
protected $memcached_instance;
2626

2727
protected function __construct(array $config)
@@ -81,7 +81,7 @@ protected function __construct(array $config)
8181
// status can be used by an external healthcheck to mark the memcached instance offline
8282
if ($status === TRUE)
8383
{
84-
$this->memcached_instance->addServer($host, $port, $weight);
84+
$this->memcached_instance->addServer($host, $port, $weight);
8585
}
8686
}
8787
else
@@ -91,16 +91,16 @@ protected function __construct(array $config)
9191
}
9292
}
9393
}
94-
94+
9595
/**
9696
* Retrieve a cached value entry by id.
97-
*
97+
*
9898
* // Retrieve cache entry from default group
9999
* $data = Cache::instance()->get('foo');
100-
*
100+
*
101101
* // Retrieve cache entry from default group and return 'bar' if miss
102102
* $data = Cache::instance()->get('foo', 'bar');
103-
*
103+
*
104104
* // Retrieve cache entry from memcache group
105105
* $data = Cache::instance('memcache')->get('foo');
106106
*
@@ -123,15 +123,15 @@ public function get($id, $default = NULL)
123123

124124
/**
125125
* Set a value to cache with id and lifetime
126-
*
126+
*
127127
* $data = 'bar';
128-
*
128+
*
129129
* // Set 'bar' to 'foo' in default group, using default expiry
130130
* Cache::instance()->set('foo', $data);
131-
*
131+
*
132132
* // Set 'bar' to 'foo' in default group for 30 seconds
133133
* Cache::instance()->set('foo', $data, 30);
134-
*
134+
*
135135
* // Set 'bar' to 'foo' in memcache group for 10 minutes
136136
* if (Cache::instance('memcache')->set('foo', $data, 600))
137137
* {
@@ -151,10 +151,10 @@ public function set($id, $data, $lifetime = 3600)
151151

152152
/**
153153
* Delete a cache entry based on id
154-
*
154+
*
155155
* // Delete 'foo' entry from the default group
156156
* Cache::instance()->delete('foo');
157-
*
157+
*
158158
* // Delete 'foo' entry from the memcache group
159159
* Cache::instance('memcache')->delete('foo')
160160
*
@@ -168,14 +168,14 @@ public function delete($id)
168168

169169
/**
170170
* Delete all cache entries.
171-
*
171+
*
172172
* Beware of using this method when
173173
* using shared memory cache systems, as it will wipe every
174174
* entry within the system for all clients.
175-
*
175+
*
176176
* // Delete all cache entries in the default group
177177
* Cache::instance()->delete_all();
178-
*
178+
*
179179
* // Delete all cache entries in the memcache group
180180
* Cache::instance('memcache')->delete_all();
181181
*
@@ -185,4 +185,4 @@ public function delete_all()
185185
{
186186
return $this->memcached_instance->flush();
187187
}
188-
}
188+
}

config/cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@
138138
'cache_dir' => APPPATH . 'cache',
139139
'default_expire' => 3600,
140140
)
141-
);
141+
);

0 commit comments

Comments
 (0)