Problem/Motivation
Currently, the module reacts to all hooks (insert, update, delete). For larger sites, the number of requests can lead to the "429: Too many requests" error.
See
https://rankmath.com/kb/how-to-fix-429-error-with-indexnow-api/
https://www.indexnow.org/faq
Proposed resolution
It is desirable in such cases to make the module only react to insert hooks, and omit the update and delete hooks. This patch should make this configurable.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3426410-configurable-hooks.patch | 3.67 KB | alexrayu |
Issue fork index_now-3426410
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
alexrayu commentedPlease review the attached patch.
Comment #3
macsim commentedInteresting feature. Thanks for your contribution.
However I think we should either set it per entity type or per bundle instead of setting it globally.
That would give a more granular way to choose which content really is important to index
Comment #5
macsim commentedCan you please check that the feature is fine with the patch https://git.drupalcode.org/project/index_now/-/merge_requests/17.diff ?
Comment #6
macsim commentedComment #7
macsim commentedComment #9
macsim commentedComment #10
axroth commented@MacSim
thanks for the new release!
Can't we have both features?
Comment #11
macsim commentedComment #12
macsim commentedHmm sorry I didn't reloaded the page and didn't saw your comment @axroth
What do you mean by "both features?" "per entity type" / "per bundle" ?
What I did here based on what was provided by @alexrayu in #2 is a "per entity type hooks config"
I need to upgrade Index Now Commerce to do the same thing.
We could open a new feature request for a "per bundle hooks config" but it would be more complex especially on the test level.
The feature request has only been merged on 3.1.x branch.
Comment #13
axroth commented> What do you mean by "both features?" "per entity type" / "per bundle" ?
My mistake. I could have seen it in the form. Thanks for having this hook-based feature in this release.
Comment #14
macsim commented