8000 Async cache wrong callback example · Issue #20874 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content < 8000 div data-target="react-partial.reactRoot">
Async cache wrong callback example #20874
Open
@torchello

Description

@torchello

Hey! Seems like an example of a callback in async cache section is incorrect:

$cachedValue = $asyncCache->get('my_value', [CacheComputation::class, 'compute'])

It's not a valid callback as the compute method is not static in the example:

class CacheComputation
{
    public function compute(ItemInterface $item): string
    {
        ...
    }
}

Am I missing something or we should adjust the docs?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0