CacheMode is configured on a per-Session basis to determine how that specific session interacts with the second-level cache (e.g. bypass, refresh, or read-only). The SessionFactory manages global configurations rather than individual session cache behaviors.