Skip to content

Conversation

@claudiamurialdo
Copy link
Collaborator

@claudiamurialdo claudiamurialdo commented Oct 15, 2025

(#1195)

  • Introduce CustomRedisSessionStore to reduce excessive EXPIRE operations in Redis and improve session handling performance. Converted ProcessRestRequest method in GXRouting.cs to fully async implementation.

  • Ensures sessions load asynchronously

  • Apply suggestions from FAzzatto -Simplified exception handling by replacing await Task.FromException(ex) with throw -Refactored to throw PageNotFoundException directly when the route cannot be handled, removed unnecessary result task, and moved CommitSessionAsync() to a finally block for clearer async flow

Removed CustomRedisSessionStore which was previously used as an experiment to reduce synchronous Redis Refresh calls. Now that LoadAsync is executed at the start of each request, those synchronous Refresh calls no longer appear to be necessary, because they were caused by the previous synchronous load.

  • Refactored method to remove the result variable and await tasks directly, preserving the original behavior.

Issue:206131

…1195)

* Introduce CustomRedisSessionStore to reduce excessive EXPIRE operations in Redis and improve session handling performance.
Converted ProcessRestRequest method in GXRouting.cs to fully async implementation.

* Ensures sessions load asynchronously

* Apply suggestions from FAzzatto
-Simplified exception handling by replacing await Task.FromException(ex) with throw
-Refactored to throw PageNotFoundException directly when the route cannot be handled, removed unnecessary result task, and moved CommitSessionAsync() to a finally block for clearer async flow

Removed CustomRedisSessionStore which was previously used as an experiment to reduce synchronous Redis Refresh calls. Now that LoadAsync is executed at the start of each request, those synchronous Refresh calls no longer appear to be necessary, because they were caused by the previous synchronous load.

* Refactored method to remove the result variable and await tasks directly, preserving the original behavior.

---------

Co-authored-by: claudiamurialdo <[email protected]>
(cherry picked from commit bb22cbb)

# Conflicts:
#	dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs
#	dotnet/src/dotnetcore/GxNetCoreStartup/SessionHelper.cs
#	dotnet/src/dotnetcore/GxNetCoreStartup/Startup.cs
#	dotnet/src/dotnetframework/GxClasses/Helpers/HttpHelper.cs
@claudiamurialdo claudiamurialdo temporarily deployed to kafka-integration-tests October 15, 2025 15:25 — with GitHub Actions Inactive
@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests October 15, 2025 15:25 — with GitHub Actions Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

@claudiamurialdo claudiamurialdo temporarily deployed to kafka-integration-tests October 15, 2025 15:30 — with GitHub Actions Inactive
@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests October 15, 2025 15:30 — with GitHub Actions Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests October 15, 2025 15:31 — with GitHub Actions Inactive
@claudiamurialdo claudiamurialdo temporarily deployed to kafka-integration-tests October 15, 2025 15:31 — with GitHub Actions Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

@claudiamurialdo claudiamurialdo temporarily deployed to external-storage-tests October 15, 2025 15:32 — with GitHub Actions Inactive
@claudiamurialdo claudiamurialdo temporarily deployed to kafka-integration-tests October 15, 2025 15:32 — with GitHub Actions Inactive
@genexusbot
Copy link
Collaborator

Cherry pick to beta success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants