Skip to content

Collection cache key? #10461

@meiyasan

Description

@meiyasan

Hello,

There are many subtleties in doctrine that I don't understand.
But why the collection cache is based on an key that involve rootEntityName ?

For instance how does it works in the following case:

#[Entity] // <--- Some entity declaration using discrimination map
class CommonClass {}

class ExtendedClassA extends CommonClass
{
      #[ManyToOne...]
      protected $attribute;
}

class ExtendedClassB extends CommonClass
{
      #[ManyToOne...]
      protected $attribute;
}

The code below should be computing a key that is something like : "commonClass_XX_attribute" in both cases and so this might conflict right ? (I am looking for a second level cache issue in one application and that's how I end up here)

return new CollectionCacheKey($metadata->rootEntityName, $association['fieldName'], $ownerId);

This is actually same for timestampKey, right ?

$this->timestampKey = new TimestampCacheKey($this->class->rootEntityName);

Thank you for your help :o)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions