-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from ndragun92/version/2.0.0
2.0.0
- Loading branch information
Showing
207 changed files
with
17,313 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['@nuxt/eslint-config'], | ||
ignorePatterns: [ | ||
'dist', | ||
'node_modules', | ||
'.output', | ||
'.nuxt' | ||
], | ||
rules: { | ||
'vue/max-attributes-per-line': 'off', | ||
'vue/multi-word-component-names': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
node_modules | ||
*.iml | ||
.idea | ||
*.log* | ||
.nuxt | ||
.vscode | ||
.DS_Store | ||
coverage | ||
dist | ||
sw.* | ||
.env | ||
.output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Docus Starter | ||
|
||
Starter template for [Docus](https://docus.dev). | ||
|
||
## Clone | ||
|
||
Clone the repository (using `nuxi`): | ||
|
||
```bash | ||
npx nuxi init -t themes/docus | ||
``` | ||
|
||
## Setup | ||
|
||
Install dependencies: | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
## Development | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
## Edge Side Rendering | ||
|
||
Can be deployed to Vercel Functions, Netlify Functions, AWS, and most Node-compatible environments. | ||
|
||
Look at all the available presets [here](https://v3.nuxtjs.org/guide/deploy/presets). | ||
|
||
```bash | ||
yarn build | ||
``` | ||
|
||
## Static Generation | ||
|
||
Use the `generate` command to build your application. | ||
|
||
The HTML files will be generated in the .output/public directory and ready to be deployed to any static compatible hosting. | ||
|
||
```bash | ||
yarn generate | ||
``` | ||
|
||
## Preview build | ||
|
||
You might want to preview the result of your build locally, to do so, run the following command: | ||
|
||
```bash | ||
yarn preview | ||
``` | ||
|
||
--- | ||
|
||
For a detailed explanation of how things work, check out [Docus](https://docus.dev). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// https://github.com/nuxt-themes/docus/blob/main/nuxt.schema.ts | ||
export default defineAppConfig({ | ||
docus: { | ||
title: 'File Sys Cache', | ||
description: 'A Node.js package providing efficient caching using the file system for storage', | ||
// TODO: Replace | ||
image: '/cover.png', | ||
socials: { | ||
github: 'ndragun92/file-sys-cache', | ||
}, | ||
aside: { | ||
level: 1, | ||
collapsed: false, | ||
exclude: [] | ||
}, | ||
main: { | ||
padded: true, | ||
fluid: false | ||
}, | ||
header: { | ||
logo: false, | ||
showLinkIcon: true, | ||
exclude: [], | ||
fluid: false | ||
}, | ||
footer: { | ||
credits: false | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
title: Home | ||
navigation: false | ||
layout: page | ||
main: | ||
fluid: false | ||
--- | ||
|
||
:ellipsis{right=0px width=75% blur=150px} | ||
|
||
::block-hero | ||
--- | ||
cta: | ||
- Get started | ||
- /introduction/getting-started | ||
secondary: | ||
- Open on GitHub → | ||
- https://github.com/nuxt-themes/docus | ||
--- | ||
|
||
#title | ||
File-Sys-Cache | ||
|
||
#description | ||
File-Sys-Cache is an npm package that provides a simple and efficient system files-based caching solution for Node.js applications. | ||
|
||
#extra | ||
::list | ||
- **Set Cache** | ||
- **Get Cached Data** | ||
- **Invalidate Cached Data** | ||
- **Flush Cache by Regex** | ||
- **Flush Whole Cache** | ||
- **Monitoring** | ||
:: | ||
|
||
#support | ||
::terminal | ||
--- | ||
content: | ||
- npm i file-sys-cache | ||
--- | ||
:: | ||
:: | ||
|
||
::card-grid | ||
#title | ||
What's included | ||
|
||
#root | ||
:ellipsis{left=0px width=40rem top=10rem blur=140px} | ||
|
||
#default | ||
::card{icon=material-symbols:add-circle-rounded} | ||
#title | ||
Set Cache | ||
#description | ||
Store data in the cache with options to specify file name prefix, file name, payload, and time-to-live (TTL). | ||
:: | ||
|
||
::card{icon=material-symbols:downloading-rounded} | ||
#title | ||
Get Cached Data | ||
#description | ||
Retrieve cached data by providing the corresponding file name or prefix. | ||
:: | ||
|
||
::card{icon=material-symbols:update-disabled-rounded} | ||
#title | ||
Invalidate Cached Data | ||
#description | ||
Automatically invalidate cached data for items with expired TTLs. | ||
:: | ||
|
||
::card{icon=material-symbols:regular-expression-rounded} | ||
#title | ||
Flush Cache by Regex | ||
#description | ||
Flush cache entries that match a given regular expression. | ||
:: | ||
|
||
::card{icon=material-symbols:cleaning-bucket-rounded} | ||
#title | ||
Flush Whole Cache | ||
#description | ||
Clear the entire cache, removing all stored entries. | ||
:: | ||
|
||
::card{icon=material-symbols:monitoring-rounded} | ||
#title | ||
Monitoring | ||
#description | ||
Monitor cache usage and performance statistics, including invalidated files count, logs over time, size over time, and request count. | ||
:: | ||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Getting Started | ||
|
||
File-Sys-Cache is an npm package that provides a simple and efficient system files-based caching solution for Node.js applications. | ||
|
||
## How to install? | ||
|
||
Install File-Sys-Cache via npm: | ||
|
||
```bash [npm] | ||
npm install file-sys-cache | ||
``` | ||
|
||
::alert{type="info"} | ||
🛈 Node 20.x or greater is preferred | ||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Configuration | ||
|
||
Minimal usage | ||
|
||
```ts | ||
import { FileSysCache } from 'file-sys-cache' | ||
|
||
const cache = new FileSysCache({ | ||
basePath: './.file-sys-cache' | ||
}); | ||
``` | ||
|
||
|
||
| **Key** | **Type** | **Default** | **Description** | | ||
|--------------------|----------------|-------------------|------------------------------------------------------------------------------------------------------------------------| | ||
| `basePath` | `string` | ./.file-sys-cache | Directory where cache will be stored | | ||
| `defaultTTL` | `number` | 60 | Expiration time in seconds | | ||
| `hash` | `THashOptions` | sha256 | Hashing algorithm | | ||
| `debug` | `boolean` | false | Enables debug mode | | ||
| `autoInvalidate` | `boolean` | false | Auto invalidate files from file-system and delete expired files automatically without need of triggering .invalidate() | | ||
| `enableMonitoring` | `boolean` | false | Enabled monitoring which exposes cache.monitoring.get(), cache.monitoring.reset() | | ||
|
||
|
||
## Hash Options | ||
|
||
```ts | ||
type THashOptions = 'RSA-MD5' | 'RSA-RIPEMD160' | 'RSA-SHA1' | 'RSA-SHA1-2' | 'RSA-SHA224' | 'RSA-SHA256' | 'RSA-SHA3-224' | 'RSA-SHA3-256' | 'RSA-SHA3-384' | 'RSA-SHA3-512' | 'RSA-SHA384' | 'RSA-SHA512' | 'RSA-SHA512/224' | 'RSA-SHA512/256' | 'RSA-SM3' | 'blake2b512' | 'blake2s256' | 'id-rsassa-pkcs1-v1_5-with-sha3-224' | 'id-rsassa-pkcs1-v1_5-with-sha3-256' | 'id-rsassa-pkcs1-v1_5-with-sha3-384' | 'id-rsassa-pkcs1-v1_5-with-sha3-512' | 'md5' | 'md5-sha1' | 'md5WithRSAEncryption' | 'ripemd' | 'ripemd160' | 'ripemd160WithRSA' | 'rmd160' | 'sha1' | 'sha1WithRSAEncryption' | 'sha224' | 'sha224WithRSAEncryption' | 'sha256' | 'sha256WithRSAEncryption' | 'sha3-224' | 'sha3-256' | 'sha3-384' | 'sha3-512' | 'sha384' | 'sha384WithRSAEncryption' | 'sha512' | 'sha512-224' | 'sha512-224WithRSAEncryption' | 'sha512-256' | 'sha512-256WithRSAEncryption' | 'sha512WithRSAEncryption' | 'shake128' | 'shake256' | 'sm3' | 'sm3WithRSAEncryption' | 'ssl3-md5' | 'ssl3-sha1' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
icon: ph:star-duotone | ||
navigation.redirect: /introduction/getting-started |
Oops, something went wrong.