You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-17Lines changed: 51 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,40 @@ manga = enma.random()
102
102
print(manga)
103
103
```
104
104
105
+
## Caching
106
+
Caching is a key feature in Enma that improves your application's efficiency by storing the results of data requests. This means when the same data is requested again, Enma can quickly retrieve it from the cache instead of repeatedly calling the external source. This results in faster response times and less strain on both your application and the external APIs.
107
+
108
+
### How Caching Benefits You
109
+
-**Speed**: Retrieving data from the cache is faster than making a new request to a manga repository.
110
+
-**Efficiency**: Reduces the number of network requests, which is especially useful when dealing with rate-limited APIs.
111
+
-**Reliability**: Provides more consistent application performance even with varying network conditions.
112
+
113
+
### Customizing Cache Settings
114
+
While Enma provides default caching settings that suit most needs, you may want to customize these settings based on your specific requirements, like how often you expect data to change or specific API rate limits.
115
+
116
+
#### Adjusting Cache Duration via Environment Variables
117
+
You can control how long data is kept in the cache by setting environment variables. This allows you to fine-tune the balance between data freshness and retrieval speed without modifying the core library code.
118
+
119
+
For example, to change the cache expiration for fetching chapters, you can set the `ENMA_CACHING_FETCH_SYMBOLIC_LINK_TTL_IN_SECONDS` environment variable:
This customization capability ensures that you can adapt the caching behavior to best fit your application's performance and efficiency needs.
127
+
128
+
By leveraging caching, Enma helps make your manga-related applications faster and more reliable, all while giving you the flexibility to tailor caching behavior as needed.
0 commit comments