Skip to content

Commit 698fece

Browse files
committed
initial commit
0 parents  commit 698fece

132 files changed

Lines changed: 19206 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
analyze:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: dart-lang/setup-dart@v1
15+
with:
16+
sdk: stable
17+
18+
- name: Install dependencies
19+
run: dart pub get
20+
working-directory: packages/syncache
21+
22+
- name: Check formatting
23+
run: dart format --set-exit-if-changed .
24+
working-directory: packages/syncache
25+
26+
- name: Analyze
27+
run: dart analyze --fatal-infos
28+
working-directory: packages/syncache
29+
30+
test:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: dart-lang/setup-dart@v1
35+
with:
36+
sdk: stable
37+
38+
- name: Install dependencies
39+
run: dart pub get
40+
working-directory: packages/syncache
41+
42+
- name: Run tests
43+
run: dart test
44+
working-directory: packages/syncache

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Dart/Flutter
2+
.dart_tool/
3+
.packages
4+
build/
5+
pubspec.lock
6+
7+
# Coverage
8+
coverage/
9+
10+
# IDE
11+
.idea/
12+
*.iml
13+
.vscode/
14+
15+
# Android
16+
**/android/local.properties
17+
**/android/key.properties
18+
**/*.keystore
19+
**/*.jks
20+
21+
# iOS
22+
**/ios/Pods/
23+
**/ios/.symlinks/
24+
**/ios/Flutter/Flutter.framework
25+
**/ios/Flutter/Flutter.podspec
26+
27+
# Environment
28+
.env*
29+
*.env
30+
31+
# OS
32+
.DS_Store
33+
Thumbs.db

melos.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: syncache
2+
repository: https://github.com/Hamdal/syncache
3+
4+
packages:
5+
- packages/**
6+
7+
command:
8+
bootstrap:
9+
usePubspecOverrides: true
10+
11+
scripts:
12+
analyze:
13+
run: dart analyze .
14+
exec:
15+
concurrency: 1
16+
packageFilters:
17+
dirExists: lib
18+
description: Run static analysis on all packages
19+
20+
format:
21+
run: dart format .
22+
exec:
23+
concurrency: 1
24+
description: Format all packages
25+
26+
format:check:
27+
run: dart format --set-exit-if-changed .
28+
exec:
29+
concurrency: 1
30+
description: Check formatting on all packages
31+
32+
test:
33+
run: dart test
34+
exec:
35+
concurrency: 1
36+
packageFilters:
37+
dirExists: test
38+
description: Run tests for all packages
39+
40+
test:coverage:
41+
run: dart test --coverage=coverage
42+
exec:
43+
concurrency: 1
44+
packageFilters:
45+
dirExists: test
46+
description: Run tests with coverage for all packages

packages/syncache/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## 0.1.0
2+
3+
- Initial release
4+
- Core caching with five policies: offlineFirst, cacheOnly, networkOnly, refresh, staleWhileRefresh
5+
- Reactive streams via `watch()` and `watchWithMeta()`
6+
- Optimistic mutations with automatic background sync
7+
- Tag-based cache invalidation
8+
- Pattern-based cache invalidation (glob support)
9+
- Request deduplication for concurrent fetches
10+
- Retry with exponential backoff
11+
- Cancellation token support
12+
- Scoped caches with key prefixing
13+
- Parallel and dependency-graph prefetching
14+
- Observer pattern for logging and analytics
15+
- MemoryStore and SharedMemoryStore implementations

packages/syncache/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Hameed Abdullateef
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)