Skip to content

Confused about the kernel dispatcher documentation #490

@alexander-schranz

Description

@alexander-schranz

I'm not correctly understanding what the index.php should look like for the kerneldispatcher setup:

If I look at the linked documentation: https://foshttpcache.readthedocs.io/en/latest/proxy-clients.html#kerneldispatcher-for-single-server-installations

The following lines:

// Tell the kernel about the cache $kernel->setHttpCache($httpCache); // Create the Symfony proxy client with KernelDispatcher $kernelDispatcher = new KernelDispatcher($kernel); $symfony = new Symfony($kernelDispatcher);

are confusing me.

Should it not be enough the following implementation:

// ... $kernel = new Kernel(...); + if (SYMFONY_ENV !== 'dev') { + $kernel = new HttpCache($kernel); + }

If I look at the symony basic index.php there is no KernelDispatcher or Symfony. Also not clear if $httpCache->handle need to be called or $kernel->handle I'm really confused if this lines are really needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions