Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,24 @@ jobs:
- name: Build release
run: cmake --build build --config Release --parallel

- name: Exercise the actual DLL and cache policy
run: ctest --test-dir build -C Release --output-on-failure

- name: Package FOMOD
shell: pwsh
run: .\package-release.ps1 -SkipBuild

- name: Upload Nexus-ready artifact
- name: Upload FOMOD artifact
uses: actions/upload-artifact@v7
with:
name: NextGenDiskCache-2.1.0-FOMOD
name: NextGenDiskCache-2.2.1-FOMOD
path: |
dist/NextGenDiskCache-2.1.0-FOMOD.zip
dist/NextGenDiskCache-2.1.0-SHA256.txt
dist/NextGenDiskCache-2.2.1-FOMOD.zip
dist/NextGenDiskCache-2.2.1-SHA256.txt

- name: Upload symbols separately
uses: actions/upload-artifact@v7
with:
name: NextGenDiskCache-2.1.0-symbols
name: NextGenDiskCache-2.2.1-symbols
path: build/symbols/NextGenDiskCache.pdb
if-no-files-found: warn
21 changes: 21 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,24 @@ Notes:
- Remove legacy diskCacheEnabler.dll when installing this.
================================================================================



2.2.0 - 2026-09-29 local candidate (parent: 4755359 / 2.1.0)
----------------------------------------------------------------
- Safe now performs active bounded buffered warming of archives successfully opened by Skyrim, including later opens within a 180-second work window. No FILE_FLAG_NO_BUFFERING flag is needed for warming to run.
- Default limits: 1024 MB/session, 64 MB/archive, 512 archives, 64 MB/s aggregate, one low-priority worker, 15 seconds after DataLoaded. Drive tuning only reduces these caps.
- Observe only successful existing synchronous read-only BSA/BA2 opens under the game Data directory. Deduplicate paths and reject saves, other modules in IAT mode, failed opens, writes and out-of-root paths.
- Read through separate shared read-only handles. Check RAM between chunks, pause on SKSE save-load messages, enforce the session deadline, preserve caller GetLastError and atomically publish IAT hooks.
- Ordinary buffered warm reads omit SEQUENTIAL_SCAN so Windows is not invited to aggressively evict earlier warmed pages. Mapped/strided options and legacy directory scanning remain available.
- Log completed ReadFile bytes separately from best-effort mapped requests and raw DirectStorage discard diagnostics. Always explain inactivity; active warming no longer triggers the old whole-plugin no-op message.
- Keep all three installer choices and existing INI keys. Minimal remains the warming-disabled control; Experimental uses larger limits and retains process-wide interception.
- Add an isolated Windows host exercising the actual DLL, plus production policy checks in CTest/CI. No save schema, game records, scripts or dependencies changed.
- In-game loading/FPS gains, the supported-runtime matrix and manager installation remain unverified. No deployment or public release in this work.
- Incorporated current remote main 10b7590 (README layout, community files and dependency-action updates). Failed archive opens now leave successful flag-change counters unchanged. The idle monitor does not repeatedly initialize empty workers.

2.2.1 - 2026-09-29 release preparation (parent: 02a3896 / 2.2.0)
----------------------------------------------------------------
- Confirmed default Safe archive warming in a real Skyrim 1.6.1170 / SKSE 2.2.8 session: 903,412,094 completed buffered bytes across 509 archives, zero warm failures, 138 save-load pause checks, 180-second work window. This establishes activity, not a comparative loading/FPS gain.
- Corrected the completion reason: later empty-batch memory replanning no longer mislabels a completed session as having no RAM headroom. Added a regression to the actual-DLL host.
- Safe limits, archive eligibility, save/memory guards, installer choices and custom opt-outs are unchanged from the tested 2.2.0 candidate.
- This is the first public release of the active Safe warming introduced in 2.2.0. Install the full FOMOD and choose Safe when upgrading from a warming-disabled profile.
22 changes: 21 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.21)
project(NextGenDiskCache VERSION 2.1.0 LANGUAGES CXX)
project(NextGenDiskCache VERSION 2.2.1 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand All @@ -10,6 +10,26 @@ add_library(NextGenDiskCache SHARED
src/IatHook.cpp
)

include(CTest)
if(BUILD_TESTING)
add_executable(CachePolicyChecks tests/cache_policy.cpp src/DirectStorageBackend.cpp src/IatHook.cpp)
target_include_directories(CachePolicyChecks PRIVATE deps/include deps/directstorage/native/include)
target_link_directories(CachePolicyChecks PRIVATE deps/libs/detours)
target_link_libraries(CachePolicyChecks PRIVATE detours.lib setupapi.lib cfgmgr32.lib)
target_compile_definitions(CachePolicyChecks PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX _CRT_SECURE_NO_WARNINGS)
add_test(NAME cache_policy COMMAND CachePolicyChecks)

add_library(CacheOtherModule SHARED tests/other_module.cpp)
add_executable(CacheHost tests/cache_host.cpp src/IatHook.cpp)
target_include_directories(CacheHost PRIVATE src deps/include)
target_compile_definitions(CacheHost PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
foreach(mode observed mapped strided pressure memfail minimal directory late pacing threads inflight wide)
add_test(NAME host_${mode} COMMAND CacheHost
"${CMAKE_SOURCE_DIR}/package/SKSE/Plugins/NextGenDiskCache.dll"
"$<TARGET_FILE:CacheOtherModule>" ${mode})
endforeach()
endif()

target_include_directories(NextGenDiskCache PRIVATE
${CMAKE_SOURCE_DIR}/deps/include
${CMAKE_SOURCE_DIR}/deps/directstorage/native/include
Expand Down
15 changes: 7 additions & 8 deletions GITHUB.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
| **This folder** | git root (``origin`` should already point here) |
| **Parent package** | ``..\`` version folders for ship zips |

```powershell
git remote -v
git status
git add -A
git commit -m "Describe change"
git push origin main
```
Current release snapshot: 2.2.1, linked worktree on `agent/release-cache-2.2.1`.
Canonical object store: sibling `source/`; do not create another repository.
The existing origin URL redirects to `SenjuWoo/NextGen-Disk-Cache` (verified
2026-09-29). Keep normal changes on a scoped branch and use a PR with the required
`build` check; main is protected. Stage explicit reviewed source paths, never
`git add -A`. GitHub publication and tagging were explicitly requested after CI passes. Nexus upload is not requested; prepare its verified package and user changelog. Game files remain read-only.

Exclude build artifacts. Keep LICENSE/upstream credit if any.
Exclude build artifacts. Keep LICENSE/upstream credit if any.
2 changes: 1 addition & 1 deletion PACKAGE-NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NextGen Disk Cache 2.0.0 - Public Package Notice
NextGen Disk Cache - Public Package Notice
================================================

This package does not include the Microsoft DirectStorage runtime DLLs.
Expand Down
21 changes: 20 additions & 1 deletion PATCH-MANIFEST.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
# NextGen Disk Cache 1.4.0 safety rework
# NextGen Disk Cache 2.2.1 runtime-evidence and diagnostic patch

Parent: 02a3896169f3b5acd26ce020ae29eac21ddcc973 / 2.2.0. The user installed the default Safe FOMOD and supplied a real game session: 903,412,094 completed buffered bytes across 509 archives, zero warm failures, 138 save-load pause checks and a 180-second work window. Performance gain was not measured.

- Keep the initial session budget for completion diagnostics; do not use a later empty batch's recalculated RAM budget as the exit reason.
- Extend the existing actual-DLL observed-mode regression: after its reads finish, reduce available RAM and require the deadline completion reason.
- Keep all warming settings, eligibility and safety behavior unchanged. Refresh release/version metadata, runtime evidence and user changelog.

## Historical 2.2.0 active cache rework

Native parent: 4755359 / 2.1.0. Current remote documentation/CI/community baseline: 10b7590. Historical 1.4.0 notes follow below and describe that release, not the 2.2.0 default.

- Safe enables paced, bounded buffered reads of successfully opened game archives, with a narrow IAT hook and separate read-only handles.
- Minimal is the warming-disabled comparison; all three installer choices and every existing INI key remain present.
- Memory checks run between chunks; the session budget and deadline bound work. DataLoaded defers startup and save-load messages pause it.
- Completed reads, accepted mapped requests and raw DirectStorage discard diagnostics have distinct counters. Failed opens do not count as successful flag changes.
- IAT publication preserves existing call-through pointers before atomic replacement. Experimental Detours enlists live threads before code changes and refuses attachment on errors.
- Tests exercise the production policy and actual DLL in isolated fixtures. No runtime deployment or public release is performed.

## Historical 1.4.0 safety rework

Base: `af0ab6172ae6f19c5f8511d46cd55163948c272a` (1.3.1).

Expand Down
Loading
Loading