Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
panki3a
@panki3a
php-cache/cache-bundle#84
look at it if you will have a time
Tobias Nyholm
@Nyholm
Thank you
panki3a
@panki3a
can you make new tag, after you merge it ?
Tobias Nyholm
@Nyholm
Naturally
panki3a
@panki3a
are you clouse my PR ?
Tobias Nyholm
@Nyholm
I gave you a comment: php-cache/cache-bundle#84
panki3a
@panki3a
but i dont know what to do right now ...
iam not involvet in this cache-bundle, i only fix this fatal
so ... if you dont want to merge it ... i cant fix it
Tobias Nyholm
@Nyholm
Just rename the method and that single method call
Nothing more than that.
Also, turn it back to private
panki3a
@panki3a
sorry, but i cant look on it right now
Tobias Nyholm
@Nyholm
No worries.
panki3a
@panki3a
may be tomorrow
Tobias Nyholm
@Nyholm
I’ll fix it now
Tobias Nyholm
@Nyholm
You got a new release now
Thank you
panki3a
@panki3a
thank you too,
we will install it right now
Tobias Nyholm
@Nyholm
Great.
panki3a
@panki3a
i can give you feedback
Tobias Nyholm
@Nyholm
We should have test covering that class to avoid this misstake
panki3a
@panki3a
hi, will you try to add symfony 4.0 support in php-cache/cache-bundle and php-cache/adapter-bundle ?
Tobias Nyholm
@Nyholm
Sure, lets put in some efforts to fix that
panki3a
@panki3a
@Nyholm i made PR to fix deprication in php-cache/cache-bundle#88
panki3a
@panki3a
@Nyholm can you make new tag 1.0.4 from master ?
Guy Radford
@guyradford
Hi, is there a plan to tag the https://github.com/php-cache/array-adapter repo with the recent bug fixes?
Tobias Nyholm
@Nyholm
Sure
@guyradford Fixed now
@panki3a Fixed.
Btw, feel free to tag new versions yourself, you got that permission, right?
Guy Radford
@guyradford
Thank you.... I guess the permission comment wasnt aimed at me?
Tobias Nyholm
@Nyholm
Na, not yet at least :)
Massimo Chiarillo
@massimo_me_twitter
Hi :)
wsm
@swim
Hello all, does anyone know what benefits the php-cache filesystem has over the symfony filesystem adapter? Both seem to exist in the same space
Egor
@egbuk_gitlab
I've encountered this php-cache/issues#134 issue with symfony 3.4.20. I'm really puzzled, the view can be found in bundle directory but symfony ignores it. Has anyone found an adequate way to fix this?
Matthias Breddin
@lunetics
@Nyholm happy new year...
Tobias Nyholm
@Nyholm
@lunetics
Happy new year
Desjardins Jérôme
@jewome62
Hello, there are no tag on main repo cache since 1,5 year. This is normal ?
Daniel Bannert
@prisis
All of the maintainer didn't have much time to work on this, but this will change soon... And the v1 ist very stable
James Beninger
@james_beninger_twitter

Quick docs question about this page: http://www.php-cache.com/en/latest/introduction/

The suggested hash method is $cacheKey = sha1($_SERVER['REQUEST_URI']);

But my understanding is that sha1 is intentionally an expensive hashing operation compared to md5. Is there a reason not to recommend using md5 for hashing cache keys?

Adrien Crivelli
@PowerKiKi

@james_beninger_twitter I don't know about md5 vs sha1, but I've been using a custom method with success. It has the advantage to accept anything as input, including objects:

/**
 * Returns a unique key identifying all arguments in the array, so we can use the result as cache key
 *
 * This only works for in-memory objects. The key returned should *never* be
 * persisted. And it may be expensive in memory because object are forced
 * not to be garbage collected.
 *
 * @param mixed $value
 *
 * @return string
 */
public static function getCacheKey($value): string
{
    static $preventGarbageCollectorFromDestroyingObject = [];

    if (is_object($value)) {
        $preventGarbageCollectorFromDestroyingObject[] = $value;

        return spl_object_hash($value);
    }

    if (is_array($value)) {
        $key = '[ARRAY|';
        foreach ($value as $i => $modelInCollection) {
            $key .= $i . '>' . self::getCacheKey($modelInCollection) . ':';
        }

        return $key . ']';
    }

    if (is_bool($value)) {
        return '[BOOL|' . $value . ']';
    }

    if ($value === null) {
        return '[NULL]';
    }

    return (string) $value;
}

Common usages could be something like:

function doSomethingExpansive($currentUser, $foo)
{
    $key = Cache::getCacheKey(func_get_args());

    $keyWithExtrasStuff = Cache::getCacheKey([
        $currentUser,
        $foo,
        $bar,
    ]);
    // ...
}
Ajith Thampi
@atj4me
Hi
Trying to use APCU Cache for PHP Spreadsheet, but consistently getting this error
Cell entry AF649 no longer exists in cache. This probably means that the cache was cleared by someone else.
Any idea ?
di-rect
@di-rect
Hello!