Skip to content

Commit

Permalink
mention limitations in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rodja committed Jan 11, 2025
1 parent 6c03b99 commit e2a0d45
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion website/documentation/content/storage_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,21 @@ def short_term_memory():


doc.text('Redis storage', '''
You can use Redis for storage as an alternative to the default file storage.
You can use [Redis](https://redis.io/) for storage as an alternative to the default file storage.
This is useful if you have multiple NiceGUI instances and want to share data across them.
To activate this feature install the `redis` package (`pip install nicegui[redis]`)
and provide the `NICEGUI_REDIS_URL` environment variable to point to your Redis server.
Our [Redis storage example](https://github.com/zauberzeug/nicegui/tree/main/examples/redis_storage) shows
how you can setup it up with a reverse proxy or load balancer.
Please note that the Redis sync always contains all the data, not only the changed values.
- For `app.storage.general` this is the whole dictionary.
- For `app.storage.user` it's all the data of the user.
- For `app.storage.tab` it's all the data stored for this specific tab.
If you have large data sets, we suggest to use a database instead.
See our [database example](https://github.com/zauberzeug/nicegui/blob/main/examples/sqlite_database/main.py) for a demo with SQLite.
But of course to sync between multiple instances you should replace SQLite with PostgreSQL or similar.
''')

0 comments on commit e2a0d45

Please sign in to comment.