SetGalleryStore enables PostgreSQL-backed OpCache persistence. Set/SetBackend upsert the cache_key + is_backend_op columns; Start hydrates the in-memory maps from active rows so a freshly-started replica does not return an empty /api/operations payload while a peer is mid-install.
(s *distributed.GalleryStore)
| 228 | // replica does not return an empty /api/operations payload while a peer |
| 229 | // is mid-install. |
| 230 | func (m *OpCache) SetGalleryStore(s *distributed.GalleryStore) { |
| 231 | m.mu.Lock() |
| 232 | defer m.mu.Unlock() |
| 233 | m.store = s |
| 234 | } |
| 235 | |
| 236 | // Start hydrates the in-memory maps from PostgreSQL (if a store was wired) |
| 237 | // and subscribes to the broadcast subjects (if NATS was wired). It returns |
no test coverage detected