-
Notifications
You must be signed in to change notification settings - Fork 52
* redis cache peer simple implementation, based on Memcached CachePeer #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ba6e5be
ff4754e
c0a2e17
e2a15d2
f6f19af
542e16c
2b693dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,8 +177,11 @@ public function delete($index, $time = null) | |
|
||
public function append($key, $data) | ||
{ | ||
$packed = serialize($data); | ||
|
||
// WHY? | ||
// see $this->store() check type need | ||
// $packed = serialize($data); | ||
$packed = $data; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Вот я не понял, почему в store() куча проверок, а в append мы сериализуем все подряд Для него вообще не должно было работать. у меня и не работало. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. а что в ассерте в этом примере получается? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. я решил доработать тесты, там еще кое-что выползает ) так что сначала доработаю тесты, а потом уже видно будет There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. окей, подождем |
||
$length = strlen($packed); | ||
|
||
// flags and exptime are ignored | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не уверен что понимаю. Почему теперь здесь $data не сериализуется?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в текущем Memcached при append сериализуется всегда а в store не всегда. string точно не сериализуется. вот и получаем stote('a', 'a'), append('a','a')
get('a') -> as : 1 : "a"
только без пробелов возле ":" а то гитхаб какую-то кнопку рисует
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
думаю, все таки, убирать сериализацию не лучшая затея. взять что-то из метода store - оно в таком случае логичнее, наверно. хотя с другой стороны кто в таком виде вообще использует метод append?