feat(cache): implement centralized caching layer for improved performance and reduced API calls

feat(microsoft-integration): enhance inbox and events fetching with caching support
feat(auth): include theme and notification settings in user data retrieval
feat(profile): improve password visibility toggle functionality
feat(planner): optimize event synchronization with Outlook using caching
fix(notifications): update mail badge handling for mobile and desktop
This commit is contained in:
2026-09-10 15:19:46 +02:00
parent 5310b87fe5
commit 72ad1fb70e
15 changed files with 334 additions and 85 deletions
+5
View File
@@ -12,6 +12,11 @@ $user = require_auth();
$userId = (int)$user['id'];
$db = get_db_connection();
// Geef het PHP sessieslot direct vrij zodat gelijktijdige paginanavigatie nooit geblokkeerd wordt
if (session_status() === PHP_SESSION_ACTIVE) {
session_write_close();
}
header('Content-Type: application/json; charset=utf-8');
try {
+7 -1
View File
@@ -11,6 +11,11 @@ $user = require_auth();
$userId = (int)$user['id'];
$db = get_db_connection();
// Geef het PHP sessieslot direct vrij zodat paginanavigatie nooit geblokkeerd wordt
if (session_status() === PHP_SESSION_ACTIVE) {
session_write_close();
}
header('Content-Type: application/json; charset=utf-8');
$action = $_GET['action'] ?? ($_POST['action'] ?? '');
@@ -20,8 +25,9 @@ try {
if ($action === 'get_inbox') {
$limit = isset($_GET['limit']) ? (int)$_GET['limit'] : 25;
$unreadOnly = !empty($_GET['unread_only']) && $_GET['unread_only'] === '1';
$forceRefresh = !empty($_GET['refresh']) && $_GET['refresh'] === '1';
$res = microsoft_fetch_inbox_messages($userId, $limit, $unreadOnly);
$res = microsoft_fetch_inbox_messages($userId, $limit, $unreadOnly, $forceRefresh);
echo json_encode($res);
exit;
}
+5
View File
@@ -9,6 +9,11 @@ require_once __DIR__ . '/../includes/integrations/microsoft.php';
$user = require_auth();
$db = get_db_connection();
// Geef het PHP sessieslot direct vrij zodat paginanavigatie nooit geblokkeerd wordt
if (session_status() === PHP_SESSION_ACTIVE) {
session_write_close();
}
header('Content-Type: application/json; charset=utf-8');
$action = $_GET['action'] ?? ($_POST['action'] ?? '');