Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 301140

Introduce HistoryRepository service

$
0
0

Problem/Motivation

The History service is sometimes slow and only works for the entity type node. All queries are hardcoded and cannot be replaced by contrib.

Proposed resolution

Introduce swappable HistoryRepository service to allow more performant implementations in contrib to figure out actual needs and help to make improvements in newer version of core.

Remaining tasks

Implement HistoryRepository and HistoryRepositoryInterface. (done)
Replace all usages of history table with proper service calls. (done)

User interface changes

No

API changes

Deprecated functions:
history_read($nid) and history_read_multiple($nids) - HistoryRepositoryInterface::getLastViewed($entity_type, $entity_ids, AccountInterface $account)
history_write($nid, AccountInterface $account = NULL) - updateLastViewed(EntityInterface $entity, AccountInterface $account)

#1029708: History table for any entity
#2078753: Add history_read_multiple()
#1991684: Node history markers (comment & node "new" indicator, "x new comments" links) forces render caching to be per user


Viewing all articles
Browse latest Browse all 301140

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>