[PR #889] [CLOSED] Allow to set second level cache lifetime through mapping #8856

Open
opened 2026-01-22 16:02:00 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/889
Author: @bakura10
Created: 12/26/2013
Status: Closed

Base: masterHead: lifetime-cache


📝 Commits (10+)

📊 Changes

11 files changed (+102 additions, -68 deletions)

View changed files

📝 docs/en/reference/second-level-cache.rst (+6 -5)
📝 doctrine-mapping.xsd (+45 -44)
📝 lib/Doctrine/ORM/Cache/DefaultCacheFactory.php (+4 -1)
📝 lib/Doctrine/ORM/Cache/RegionsConfiguration.php (+10 -0)
📝 lib/Doctrine/ORM/Mapping/Cache.php (+6 -1)
📝 lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php (+6 -4)
📝 lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php (+6 -4)
📝 lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php (+6 -4)
📝 tests/Doctrine/Tests/Models/Cache/City.php (+4 -4)
📝 tests/Doctrine/Tests/ORM/Cache/CacheConfigTest.php (+3 -1)
📝 tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php (+6 -0)

📄 Description

Hi,

I don't fully understand the new second-level cache feature yet, but the doc looks promising. I realized it could be really nice to be able to specify the lifetime directly through mapping.

I'm not sure if this is a good idea yet, please tell me. I've updated the tests and the doc too.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/889 **Author:** [@bakura10](https://github.com/bakura10) **Created:** 12/26/2013 **Status:** ❌ Closed **Base:** `master` ← **Head:** `lifetime-cache` --- ### 📝 Commits (10+) - [`5b0db6e`](https://github.com/doctrine/orm/commit/5b0db6e72e766b5108e75a823c9b9dd08cf55c8b) Rebase to master - [`46a686a`](https://github.com/doctrine/orm/commit/46a686a423bc6aca608bb2398be192453fe241b8) Allow to specify lifetime in mapping - [`c09b5fb`](https://github.com/doctrine/orm/commit/c09b5fbe0ecf0a568a737f3c209aa804bb7682cd) Merge branch 'master' of https://github.com/doctrine/doctrine2 into lifetime-cache - [`c017739`](https://github.com/doctrine/orm/commit/c01773966b8fa6d41fbcb879b3df6927596f2d32) Add doc - [`7742a38`](https://github.com/doctrine/orm/commit/7742a389dae3e23ac072b5dcc30b1b470f84a1e7) Fix alignment - [`4a85e23`](https://github.com/doctrine/orm/commit/4a85e2333007824c1c1c89cea354d411581ef69d) Remove default value to ensure it can use global config value - [`83d144c`](https://github.com/doctrine/orm/commit/83d144c629e070d712ed7542c73d95dd690a86ca) Set default value in tests - [`dbf166c`](https://github.com/doctrine/orm/commit/dbf166cab218bf3d05737517aad363c67df3ea46) Update XSD file - [`f316e0f`](https://github.com/doctrine/orm/commit/f316e0f7f7311e20b06a2d23b02274308a5f7567) Revert files - [`38c3d6e`](https://github.com/doctrine/orm/commit/38c3d6e0038734d99e3eba364f0aca2709065e64) Merge branch 'master' of https://github.com/doctrine/doctrine2 into lifetime-cache ### 📊 Changes **11 files changed** (+102 additions, -68 deletions) <details> <summary>View changed files</summary> 📝 `docs/en/reference/second-level-cache.rst` (+6 -5) 📝 `doctrine-mapping.xsd` (+45 -44) 📝 `lib/Doctrine/ORM/Cache/DefaultCacheFactory.php` (+4 -1) 📝 `lib/Doctrine/ORM/Cache/RegionsConfiguration.php` (+10 -0) 📝 `lib/Doctrine/ORM/Mapping/Cache.php` (+6 -1) 📝 `lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php` (+6 -4) 📝 `lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php` (+6 -4) 📝 `lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php` (+6 -4) 📝 `tests/Doctrine/Tests/Models/Cache/City.php` (+4 -4) 📝 `tests/Doctrine/Tests/ORM/Cache/CacheConfigTest.php` (+3 -1) 📝 `tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php` (+6 -0) </details> ### 📄 Description Hi, I don't fully understand the new second-level cache feature yet, but the doc looks promising. I realized it could be really nice to be able to specify the lifetime directly through mapping. I'm not sure if this is a good idea yet, please tell me. I've updated the tests and the doc too. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:02:00 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8856