Ghost/ghost/admin/mirage
Kevin Ansfield 40ee2043e0
Reduced Admin search re-indexes (#20154)
closes https://linear.app/tryghost/issue/MOM-97

The 30s search content expiry didn't really make sense and caused unnecessary delays and server load now that search will be more widely used within the editor.

- replaced concept of time-based expiry with explicit expiry
  - content still fetched on query if not already loaded or marked as stale
  - added `.expireContent()` method on search service to allow explicit expiry
- updated editor to pre-fetch search content when not already loaded or marked as stale
  - removes delay when first using internal linking search inside the editor
- updated post model to expire search content on save
  - expires on published post save or delete
  - expires on publish and unpublish
- updated tag model to expire content on create/save/delete
  - only expires when name or url is changed
- updated user model to expire on save/delete
  - only expires when name or url is changed
  - does not handle creation because that's done server-side via invites
2024-05-07 15:24:20 +01:00
..
config Reduced Admin search re-indexes (#20154) 2024-05-07 15:24:20 +01:00
factories Added Mentions email notification settings (#16245) 2023-02-09 17:03:03 +08:00
fixtures Added portal default plan setting (#19238) 2023-12-06 11:39:58 +01:00
models Added redeemed offers filtering for members (#16071) 2023-01-11 20:13:09 +08:00
scenarios Updated newsletter management for switch to nullable sender_name 2022-04-15 09:43:22 +01:00
serializers Reduced Admin search re-indexes (#20154) 2024-05-07 15:24:20 +01:00
.eslintrc.js Update dependency eslint to v7 (#1566) 2020-05-17 22:53:37 +01:00
config.js Fixed "The routes only function has been deprecated" output in test runs 2022-05-25 11:03:05 +01:00
routes-dev.js Fixed "The routes only function has been deprecated" output in test runs 2022-05-25 11:03:05 +01:00
routes-test.js Added Mentions endpoint to Admin (#16136) 2023-01-17 20:16:18 +08:00
utils.js 🐛 Fixed error preventing admin area being usable by staff users with Contributor role 2022-10-31 12:01:39 +00:00