change argument hash creation
This commit is contained in:
@@ -339,7 +339,7 @@ abstract class BaseLoop
|
|||||||
public function count()
|
public function count()
|
||||||
{
|
{
|
||||||
$hash = $this->args->getHash();
|
$hash = $this->args->getHash();
|
||||||
if(false === array_key_exists($hash, self::$cacheCount))
|
if(false === isset(self::$cacheCount[$hash]))
|
||||||
{
|
{
|
||||||
$count = 0;
|
$count = 0;
|
||||||
if ($this instanceof PropelSearchLoopInterface) {
|
if ($this instanceof PropelSearchLoopInterface) {
|
||||||
@@ -370,7 +370,7 @@ abstract class BaseLoop
|
|||||||
public function exec(&$pagination)
|
public function exec(&$pagination)
|
||||||
{
|
{
|
||||||
$hash = $this->args->getHash();
|
$hash = $this->args->getHash();
|
||||||
if(false === array_key_exists($hash, self::$cacheLoopResult))
|
if(false === isset(self::$cacheLoopResult[$hash]))
|
||||||
{
|
{
|
||||||
if ($this instanceof PropelSearchLoopInterface) {
|
if ($this instanceof PropelSearchLoopInterface) {
|
||||||
$searchModelCriteria = $this->buildModelCriteria();
|
$searchModelCriteria = $this->buildModelCriteria();
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ class Argument
|
|||||||
return $this->type->getFormattedValue($this->value);
|
return $this->type->getFormattedValue($this->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRawValue()
|
||||||
|
{
|
||||||
|
return $this->value;
|
||||||
|
}
|
||||||
|
|
||||||
public function setValue($value)
|
public function setValue($value)
|
||||||
{
|
{
|
||||||
if ($value === null) {
|
if ($value === null) {
|
||||||
@@ -147,4 +152,5 @@ class Argument
|
|||||||
$empty
|
$empty
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,6 +153,11 @@ class ArgumentCollection implements \Iterator
|
|||||||
unset($arguments['name']);
|
unset($arguments['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sha1(serialize($arguments));
|
$string = '';
|
||||||
|
foreach ($arguments as $key => $argument) {
|
||||||
|
$string .= $key.'='.$argument->getRawValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
return md5($string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user