• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IMIO / imio.directory.core / 39781152039
83%

Build:
DEFAULT BRANCH: main
Ran 22 Oct 2026 12:52PM UTC
Jobs 1
Files 35
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Oct 2026 12:46PM UTC coverage: 82.764% (+1.3%) from 81.457%
39781152039

push

github

web-flow
Feat/search cache entity (#17)

* feat: RAM cache of the @search results for the contacts of one entity

The @search endpoint now keeps in a RAM cache the results for the
contacts of one entity (selected_entities parameter with one UID, as
sent by imio.smartweb.core). The cache key contains a generation
counter of the entity, stored in the annotations of the site.

A change on a contact (add, modify, move, remove, transition) or on the
populating_entities of an entity increments the generation of the
entity, so the next search computes new results.

The cache is used only for anonymous users: the results of an
authenticated user must not be shared with others. It can be disabled
with the imio.directory.core.search_cache_enabled registry record
(upgrade step 1019 to 1020).

Port of WEB-4366 from imio.news.core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: make @search Last-Modified follow the contacts of the entity

The Last-Modified header and the ETag of @search used the modification
date of the site, which never changes. Varnish revalidated its cached
results, always got a 304 and kept the old contacts.

An ILastModified adapter now returns the time of the last search cache
invalidation of the requested entity (selected_entities with one UID).
When the entity is not known, it returns the current time, so no 304 is
sent.

A change on a contact now also invalidates the entities that show it
(selected_entities), also after a move. Before, only the entity that
contains the contact was invalidated.

After a change in the contacts, send a BAN of @search to the caching
servers (CACHING_SERVERS), only one time for each transaction.
ban_physicalpath sends the BAN after the commit, and not when the
transaction fails. Requires imio.smartweb.common >= 1.2.62.

Port of imio.news.core #14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: a failed BAN of @search does not stop the ODWB sending

The BAN of the search endpoint and... (continued)

108 of 112 new or added lines in 3 files covered. (96.43%)

1114 of 1346 relevant lines covered (82.76%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
96.0
21.0% src/imio/directory/core/rest/search/endpoint.py
1
91.93
1.76% src/imio/directory/core/subscribers.py
Jobs
ID Job ID Ran Files Coverage
1 39781152039.1 22 Oct 2026 12:52PM UTC 35
82.76
GitHub Action Run
Source Files on build 39781152039
  • Tree
  • List 35
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39781152039
  • 4a8aadd4 on github
  • Prev Build on main (#39415749460)
  • Next Build on main (#39792544253)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc