Home GnuPG
Diffusion GnuPG fad91071cadf

g10: Simplify cache. Only include data that is actually used.
fad91071cadfUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

g10: Simplify cache. Only include data that is actually used.

* g10/keydb.c (struct kid_list_s): Rename from this...
(struct kid_not_found_cache_bucket): ... to this.  Update users.
Remove field state.
(kid_list_t): Remove type.
(KID_NOT_FOUND_CACHE_BUCKETS): Define.  Use this instead of a literal.
(kid_found_table): Rename from this...
(kid_not_found_cache_bucket): ... to this.  Update users.
(kid_found_table_count): Rename from this...
(kid_not_found_cache_count): ... to this.  Update users.
(kid_not_found_p): Only return whether a key with the specified key id
is definitely not in the database.
(kid_not_found_insert): Remove parameter found.  Update callers.
(keydb_search): Only insert a key id in the not found cache if it is
not found.  Rename local variable once_found to already_in_cache.

Commit e0873a33 started tracking whether key ids where definitely in
the database. This information is, however, never used and thus just
unnecessarily inflates the cache. This patch effectively reverts that
change (however, e0873a33 contains two separate changes and this only
reverts that change).

  • Signed-off-by: Neal H. Walfield <neal@g10code.com>.

Details

Provenance
Neal H. Walfield <neal@g10code.com>Authored on Aug 26 2015, 12:22 PM
Parents
rG9d07f6930aaa: Add configure option --enable-build-timestamp.
Branches
Unknown
Tags
Unknown

Event Timeline

Neal H. Walfield <neal@g10code.com> committed rGfad91071cadf: g10: Simplify cache. Only include data that is actually used. (authored by Neal H. Walfield <neal@g10code.com>).Aug 26 2015, 12:25 PM