Julien Castiaux
04e972660b
[IMP] core: don't save visitor default session
...
Every request comes with a session, a dictionary that is persisted on
the filesystem and that saves various information such as the user
cart on the ecommerce.
When a user simply visits the website, a default session is created and
saved on disk, this bloats the filestore with many sessions. Creating
the session on-the-fly is cheaper than loading it from the filesystem.
With this work the default session is not saved on disk anymore unless
explicitly asked via `session.touch()`.
An exception to the statement "creating the session on-the-fly is
cheaper" is geoip, the ip geolocalization is not cheap. In this work,
geoip have been moved from http_routing/request.session.geoip to a
lazy property core/request.geoip. When requested the info is persisted
on the session. Like other keys from the default session, geoip will not
be persisted unless there is non-default stuff in the session.
Because the CSRF-TOKEN is based on the session-id, it is important the
session-id stays the same across multiples requests even when the
session is not persisted on disk. Even when a session is not persisted
on disk, the session-id cookie is still set so that the next session
created on-the-fly uses the same session-id.
Technical note regarding the session, it has been decided to drop the
session-snapshot protocol and to reintroduce a "modified" flag. It has
been decided not to use werkzeug's session (which natively comes with a
"modified" flag) and to keep our own session object. We decided to
extend MutableMapping instead of dict; using MutableMapping we only
have to override __setitem__ and __detitem__; using dict we would had to
override update()/pop()/... too.
Task: 2789035
Part-of: odoo/odoo#86015
2022-04-05 14:13:54 +02:00
..
2022-04-04 16:48:22 +02:00
2022-03-11 15:19:09 +00:00
2022-03-31 12:32:47 +02:00
2022-03-12 10:57:13 +00:00
2022-03-31 15:27:03 +02:00
2022-03-29 10:56:30 +02:00
2022-03-29 10:56:15 +02:00
2022-02-24 11:26:50 +00:00
2022-03-31 12:32:47 +02:00
2022-03-10 16:35:04 +00:00
2022-03-22 23:30:59 +01:00
2022-03-31 02:10:53 +02:00
2022-03-31 02:10:53 +02:00
2022-04-05 14:13:54 +02:00
2022-03-02 13:05:42 +00:00
2022-03-02 22:16:52 +00:00
2022-03-23 01:26:13 +01:00
2022-02-07 14:18:00 +00:00
2022-02-07 14:17:59 +00:00
2022-02-14 10:44:50 +00:00
2022-03-02 13:05:42 +00:00
2022-02-18 14:29:20 +00:00
2022-04-01 18:49:46 +02:00
2022-03-29 10:56:40 +02:00
2022-03-28 10:45:50 +02:00
2022-04-04 14:45:26 +02:00
2022-02-24 13:30:51 +00:00
2022-04-04 17:48:39 +02:00
2022-03-14 17:28:27 +00:00
2022-02-12 08:55:18 +00:00
2022-03-26 00:11:24 +01:00
2022-04-04 16:48:17 +02:00
2022-02-14 10:44:50 +00:00
2022-03-02 17:10:48 +00:00
2022-04-01 18:49:56 +02:00
2021-12-14 12:39:54 +00:00
2022-03-23 07:06:06 +01:00
2022-02-02 11:46:52 +00:00
2022-04-04 09:24:46 +02:00
2022-04-04 16:48:17 +02:00
2022-03-23 20:18:34 +01:00
2022-03-02 17:10:48 +00:00
2022-03-02 17:10:48 +00:00
2022-03-23 20:18:34 +01:00
2022-04-01 17:56:24 +02:00
2022-02-12 08:55:18 +00:00
2022-04-01 13:37:16 +02:00
2022-04-01 13:37:16 +02:00
2022-03-30 17:04:50 +02:00
2022-03-02 17:10:48 +00:00
2022-02-14 10:44:50 +00:00
2022-04-01 10:36:10 +02:00
2022-02-12 08:55:18 +00:00
2022-04-01 13:37:16 +02:00
2022-03-02 13:05:42 +00:00
2022-03-01 09:57:39 +00:00
2022-04-04 17:48:39 +02:00
2022-03-14 17:28:13 +00:00
2022-04-04 17:48:29 +02:00
2022-03-29 10:56:15 +02:00
2022-03-02 18:45:59 +00:00
2022-02-28 17:27:08 +00:00
2022-04-04 17:48:46 +02:00
2022-04-04 09:24:59 +02:00
2022-03-02 18:45:59 +00:00
2022-03-02 13:05:42 +00:00
2022-04-05 08:03:42 +02:00
2022-04-01 13:37:09 +02:00
2022-04-04 17:48:29 +02:00
2021-12-15 12:07:26 +00:00
2022-04-01 15:32:59 +02:00
2022-03-16 16:07:00 +01:00
2022-03-30 17:04:47 +02:00
2022-03-30 17:04:49 +02:00
2022-04-01 10:36:10 +02:00
2022-04-05 14:13:54 +02:00
2022-03-24 12:57:16 +01:00
2022-03-31 02:10:53 +02:00
2022-02-21 17:01:02 +00:00
2022-02-16 16:57:20 +00:00
2022-04-04 17:48:39 +02:00
2022-03-31 17:24:55 +02:00
2021-12-08 11:17:22 +00:00
2022-03-31 17:25:06 +02:00
2022-02-12 08:55:18 +00:00
2022-03-31 17:24:55 +02:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-03-29 10:56:15 +02:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-03-24 13:57:11 +01:00
2022-03-31 17:24:55 +02:00
2022-04-05 13:20:56 +02:00
2022-02-12 08:55:18 +00:00
2022-01-25 17:21:04 +00:00
2022-02-12 08:55:18 +00:00
2022-01-27 21:50:25 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-03-31 17:24:55 +02:00
2021-12-18 21:00:49 +00:00
2022-03-25 15:54:38 +01:00
2022-03-28 10:46:11 +02:00
2022-03-30 16:34:10 +02:00
2022-03-07 19:15:03 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-17 09:06:57 +00:00
2022-02-28 08:26:51 +00:00
2022-04-01 15:07:05 +02:00
2022-02-21 16:07:50 +00:00
2022-02-12 08:55:18 +00:00
2022-03-31 17:24:55 +02:00
2022-03-09 09:23:58 +00:00
2022-03-31 17:24:55 +02:00
2022-03-31 07:55:40 +02:00
2022-03-03 11:04:30 +00:00
2022-03-24 13:57:11 +01:00
2022-01-11 13:34:56 +00:00
2022-03-31 17:24:55 +02:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-03-09 16:12:57 +00:00
2022-02-12 08:55:18 +00:00
2022-04-04 23:41:07 +02:00
2022-02-12 08:55:18 +00:00
2022-03-09 16:12:57 +00:00
2022-03-29 20:20:15 +02:00
2022-02-28 13:52:51 +00:00
2022-03-03 11:04:03 +00:00
2022-03-03 11:04:03 +00:00
2022-03-03 11:04:03 +00:00
2022-02-08 14:53:55 +00:00
2022-02-25 14:29:44 +00:00
2022-04-05 08:55:30 +02:00
2022-04-01 09:38:49 +02:00
2022-03-24 13:57:11 +01:00
2022-03-24 23:29:54 +01:00
2022-01-28 14:10:01 +00:00
2022-03-03 16:17:42 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-03-31 17:24:55 +02:00
2022-03-31 17:24:55 +02:00
2022-03-31 17:24:55 +02:00
2022-03-29 10:56:15 +02:00
2022-02-12 08:55:18 +00:00
2022-03-29 10:56:15 +02:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-23 12:08:57 +00:00
2021-12-22 00:12:52 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-03-15 10:48:45 +01:00
2022-03-15 10:48:45 +01:00
2022-03-18 14:14:58 +01:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-03-31 17:24:55 +02:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-03-02 17:10:48 +00:00
2022-03-31 09:40:48 +02:00
2022-04-04 17:48:39 +02:00
2022-03-30 13:04:58 +02:00
2021-12-21 09:49:38 +00:00
2022-03-29 10:56:15 +02:00
2022-03-14 18:16:16 +00:00
2022-03-31 12:32:47 +02:00
2022-03-29 10:56:15 +02:00
2022-03-02 17:10:48 +00:00
2022-03-02 17:10:48 +00:00
2022-03-17 16:49:47 +01:00
2022-03-07 13:30:55 +00:00
2022-02-24 13:30:51 +00:00
2022-03-29 10:56:36 +02:00
2022-04-01 13:37:16 +02:00
2022-03-31 17:24:44 +02:00
2022-03-31 17:24:44 +02:00
2022-03-31 09:40:55 +02:00
2021-12-07 16:20:05 +00:00
2022-03-21 11:12:08 +01:00
2022-02-16 11:30:29 +00:00
2022-04-05 12:23:50 +02:00
2022-03-31 10:36:51 +02:00
2021-12-07 16:20:06 +00:00
2022-04-04 17:48:39 +02:00
2022-04-04 09:24:53 +02:00
2022-03-31 12:32:47 +02:00
2022-02-28 12:55:47 +00:00
2022-02-28 12:55:47 +00:00
2022-02-28 12:55:47 +00:00
2022-03-09 09:24:02 +00:00
2022-02-12 08:55:18 +00:00
2022-02-28 12:55:47 +00:00
2022-03-29 10:56:15 +02:00
2022-02-28 12:55:47 +00:00
2022-02-14 10:44:50 +00:00
2022-03-11 11:40:53 +00:00
2022-03-29 08:57:43 +02:00
2022-02-02 19:50:49 +00:00
2022-02-12 08:55:18 +00:00
2022-03-21 14:01:13 +01:00
2022-04-04 10:25:22 +02:00
2022-03-31 02:10:53 +02:00
2022-03-25 11:22:45 +01:00
2022-02-14 10:44:50 +00:00
2022-02-14 10:44:50 +00:00
2022-04-04 10:25:22 +02:00
2022-02-14 10:44:50 +00:00
2022-01-27 21:50:25 +00:00
2022-02-14 10:44:50 +00:00
2022-04-04 10:25:22 +02:00
2022-03-02 13:05:42 +00:00
2022-04-04 10:25:22 +02:00
2022-04-04 10:25:22 +02:00
2022-02-18 09:49:20 +00:00
2022-04-04 10:25:22 +02:00
2022-02-14 10:44:50 +00:00
2022-03-04 10:08:42 +00:00
2022-03-29 10:56:15 +02:00
2022-02-14 10:44:50 +00:00
2022-01-19 16:52:23 +00:00
2022-03-21 14:01:03 +01:00
2022-04-04 17:48:23 +02:00
2022-04-01 15:33:00 +02:00
2021-12-14 12:39:54 +00:00
2022-04-01 15:33:00 +02:00
2022-04-01 15:33:00 +02:00
2022-04-01 15:33:00 +02:00
2022-03-12 08:18:10 +00:00
2022-03-02 17:10:48 +00:00
2022-04-04 17:48:08 +02:00
2022-03-21 18:46:57 +01:00
2022-02-02 09:03:44 +00:00
2022-04-04 17:48:08 +02:00
2022-04-04 17:48:08 +02:00
2022-04-04 17:48:23 +02:00
2022-03-28 18:59:57 +02:00
2022-03-29 10:56:25 +02:00
2022-04-04 14:45:22 +02:00
2022-03-28 19:58:50 +02:00
2022-02-22 17:11:01 +00:00
2022-03-04 12:16:35 +00:00
2022-04-04 11:27:58 +02:00
2022-03-11 13:30:48 +00:00
2022-03-31 10:36:51 +02:00
2022-02-25 11:40:19 +00:00
2022-02-25 11:40:20 +00:00
2022-04-04 17:48:23 +02:00
2022-04-01 15:33:00 +02:00
2022-03-21 12:11:51 +01:00
2022-01-14 17:29:35 +00:00
2022-04-04 17:48:46 +02:00
2022-04-04 17:48:23 +02:00
2022-02-28 13:52:41 +00:00
2022-04-04 16:48:16 +02:00
2022-04-04 17:48:39 +02:00
2022-04-04 17:48:39 +02:00
2022-03-31 12:32:47 +02:00
2022-04-01 17:57:02 +02:00
2021-12-07 16:20:06 +00:00
2022-03-02 13:06:10 +00:00
2022-03-21 11:11:59 +01:00
2022-04-01 13:37:08 +02:00
2022-01-19 16:52:23 +00:00
2022-04-04 17:48:46 +02:00
2022-04-04 17:48:46 +02:00
2022-04-04 17:48:46 +02:00
2022-04-04 17:48:46 +02:00
2022-04-04 17:48:46 +02:00
2022-04-04 17:48:46 +02:00
2022-03-29 10:56:25 +02:00
2022-02-17 17:37:51 +00:00
2022-03-29 10:56:16 +02:00
2022-02-18 14:28:53 +00:00
2022-02-21 12:16:57 +00:00
2022-03-31 02:10:53 +02:00
2022-02-12 08:55:18 +00:00
2022-02-23 13:58:12 +00:00
2022-02-24 13:30:51 +00:00
2022-04-05 14:13:54 +02:00
2022-04-05 10:54:09 +02:00
2022-03-02 13:05:42 +00:00
2022-04-05 08:55:36 +02:00
2022-03-02 13:05:42 +00:00
2022-04-05 14:13:54 +02:00
2022-03-29 10:56:15 +02:00
2022-03-30 16:34:18 +02:00
2022-03-02 17:10:48 +00:00
2022-04-01 18:49:56 +02:00
2022-03-18 12:26:36 +01:00
2022-02-12 08:55:18 +00:00
2022-04-01 17:56:24 +02:00
2022-03-23 20:18:34 +01:00
2022-03-23 20:18:34 +01:00
2022-03-23 20:18:34 +01:00
2022-03-29 10:56:15 +02:00
2022-02-08 14:53:37 +00:00
2022-03-29 10:56:15 +02:00
2022-03-23 20:18:34 +01:00
2022-03-23 20:18:34 +01:00
2022-03-23 20:18:34 +01:00
2022-03-23 20:18:34 +01:00
2022-03-23 20:18:34 +01:00
2022-03-23 20:18:34 +01:00
2022-02-12 08:55:18 +00:00
2022-03-09 13:12:44 +00:00
2022-03-02 13:05:42 +00:00
2022-04-01 13:37:09 +02:00
2022-03-02 13:05:42 +00:00
2022-03-02 13:05:42 +00:00
2022-04-04 17:48:39 +02:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-02-12 08:55:18 +00:00
2022-03-30 16:33:48 +02:00
2022-02-08 14:53:39 +00:00
2022-02-08 14:53:39 +00:00
2022-03-02 13:05:42 +00:00
2022-03-29 20:21:26 +02:00
2022-02-21 08:41:30 +00:00
2022-02-25 07:35:40 +00:00
2022-02-21 08:41:30 +00:00
2022-02-21 08:41:33 +00:00
2022-03-02 17:10:48 +00:00
2022-02-21 08:41:30 +00:00
2022-02-21 08:41:30 +00:00
2022-03-02 17:10:48 +00:00
2022-02-21 08:41:33 +00:00
2022-03-29 10:56:15 +02:00
2022-02-21 08:41:30 +00:00
2022-04-04 17:48:39 +02:00
2022-03-02 13:05:42 +00:00
2022-02-28 11:07:38 +00:00
2022-02-12 08:55:18 +00:00
2022-02-24 13:30:51 +00:00