forgejo/modules/session
Nils Goroll f8a8dd2c29 chore: remove _old_uid hack (#11277)
The virtual session code creates an in-memory session, and only upon release does it copy it to the actual session store. This makes a lot of sense to avoid operations on session stores with potentially high cost for I/O.

This commit removes a weird hack used in this code: virtual sessions were always created with an _old_uid=0 key/value pair, which was taken into account when checking if the session needed to be persisted.

As I could not find _any_ use of _old_uid in the code base, this looks like something worth removing.

The first ever mention of _old_uid is b33f7f792b and even there it is part of a
newly added file with no additional information. So likely code copied over from another project?

- no tests to add, remove or change
- not relevant for documentation
- not relevant for release notes

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11277
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Nils Goroll <nils.goroll@uplex.de>
Co-committed-by: Nils Goroll <nils.goroll@uplex.de>
2026-02-17 00:52:56 +01:00
..
db.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
redis.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
store.go [CHORE] Move to new sessioner library 2024-08-25 03:47:08 +02:00
virtual.go chore: remove _old_uid hack (#11277) 2026-02-17 00:52:56 +01:00