Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Updated sphinx & links clean up #240

Merged
merged 3 commits into from
Aug 1, 2023
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
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,5 @@
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
3 changes: 2 additions & 1 deletion docs/how.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
How django-cachalot works
-------------------------

.. note:: If you don’t understand, you can pretend it’s magic.
.. note::
If you don’t understand, you can pretend it’s magic.

Reverse engineering
...................
Expand Down
10 changes: 5 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ Usage
#. ``pip install django-cachalot``
#. Add ``'cachalot',`` to your ``INSTALLED_APPS``
#. If you use multiple servers with a common cache server,
:ref:`double check their clock synchronisation <https://django-cachalot.readthedocs.io/en/latest/limits.html#multiple-servers>`_
:ref:`double check their clock synchronisation <Multiple servers>`
#. If you modify data outside Django
– typically after restoring a SQL database –,
use the :ref:`manage.py command <https://django-cachalot.readthedocs.io/en/latest/quickstart.html#command>`_
#. Be aware of :ref:`the few other limits <https://django-cachalot.readthedocs.io/en/latest/limits.html#limits>`_
use the :ref:`manage.py command <Command>`
#. Be aware of :ref:`the few other limits <Limits>`
#. If you use
`django-debug-toolbar <https://github.com/jazzband/django-debug-toolbar>`_,
you can add ``'cachalot.panels.CachalotPanel',``
to your ``DEBUG_TOOLBAR_PANELS``
#. Enjoy!

Note: In settings, you can use `CACHALOT_UNCACHABLE_TABLES <https://django-cachalot.readthedocs.io/en/latest/quickstart.html#cachalot-only-cachable-tables>`_ as a frozenset of table names (e.g. "public_test" if public was the app name and test is a model name).
Note: In settings, you can use :ref:`CACHALOT_UNCACHABLE_TABLES` as a frozenset of table names (e.g. "public_test" if public was the app name and test is a model name).

Why use cachalot? `Check out our comparison <https://django-cachalot.readthedocs.io/en/latest/introduction.html#comparison-with-similar-tools>`_
Why use cachalot? :ref:`Check out our comparison <Comparison with similar tools>`

Below the tree is an in-depth opinion from the new maintainer:

Expand Down
7 changes: 3 additions & 4 deletions docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ Features
that per-object feature, they are unreliable and dangerous for your data.
- **Handles everything in the ORM**. You can use the most advanced features
from the ORM without a single issue, django-cachalot is extremely robust.
- An easy control thanks to :ref:`settings` and :ref:`a simple API <API>`.
- An easy control thanks to :ref:`settings` and :ref:`a simple API <Api>`.
But that’s only required if you have a complex infrastructure. Most people
will never use settings or the API.
- A few bonus features like
:ref:`a signal triggered at each database change <Signal>`
(including bulk changes) and
:ref:`a template tag for a better template fragment caching <Template utils>`.

.. _Comparison with similar tools:

Comparison with similar tools
.............................

Expand All @@ -64,9 +66,6 @@ to the other popular automatic ORM caches at the moment:
`django-cache-machine <https://github.com/django-cache-machine/django-cache-machine>`_
& `django-cacheops <https://github.com/Suor/django-cacheops>`_.

Features
~~~~~~~~

===================================================== ========= ============= ==========
Feature cachalot cache-machine cacheops
===================================================== ========= ============= ==========
Expand Down
2 changes: 1 addition & 1 deletion docs/limits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ in that query by comparing with models registered by Django.

This is quite robust, so if a query is not invalidated automatically
by this system, please :ref:`send a bug report <Reporting>`.
In the meantime, you can use :ref:`the API <API>` to manually invalidate
In the meantime, you can use :ref:`the API <Api>` to manually invalidate
the tables where data has changed.

However, this simple system can be too efficient in some very rare cases
Expand Down
6 changes: 3 additions & 3 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Usage
#. ``pip install django-cachalot``
#. Add ``'cachalot',`` to your ``INSTALLED_APPS``
#. If you use multiple servers with a common cache server,
:ref:`double check their clock synchronisation <multiple servers>`
:ref:`double check their clock synchronisation <Multiple servers>`
#. If you modify data outside Django
– typically after restoring a SQL database –,
use the :ref:`manage.py command <Command>`
Expand Down Expand Up @@ -61,7 +61,7 @@ Settings

.. warning::
After modifying this setting, you should invalidate the cache
:ref:`using the manage.py command <Command>` or :ref:`the API <API>`.
:ref:`using the manage.py command <Command>` or :ref:`the API <Api>`.
Indeed, only the cache configured using this setting is automatically
invalidated by django-cachalot – for optimisation reasons. So when you
change this setting, you end up on a cache that may contain stale data.
Expand Down Expand Up @@ -197,7 +197,7 @@ Settings
to use ``./manage.py invalidate_cachalot``).

``CACHALOT_FINAL_SQL_CHECK``
~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Default: ``False``
:Description:
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Sphinx==1.6.2
sphinx-rtd-theme==0.2.4
Sphinx==6.2.1
sphinx-rtd-theme==1.2.2