Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OnionSproutsBot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Anti-censorship
GetTor Project
OnionSproutsBot
Merge requests
!31
Expire cache entries after 10minutes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Expire cache entries after 10minutes
meskio/onionsproutsbot:expire_cache
into
main
Overview
3
Commits
1
Pipelines
0
Changes
2
All threads resolved!
Hide all comments
Merged
meskio
requested to merge
meskio/onionsproutsbot:expire_cache
into
main
1 year ago
Overview
3
Commits
1
Pipelines
0
Changes
2
All threads resolved!
Hide all comments
Expand
And make the cache path configurable.
Closes:
#53 (closed)
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
61c8f770
1 commit,
1 year ago
2 files
+
4
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
OnionSproutsBot/plugins/tor_browser.py
+
2
−
1
Options
import
logging
from
datetime
import
timedelta
from
typing
import
Tuple
,
Optional
import
requests_cache
@@ -11,7 +12,7 @@ from OnionSproutsBot.config import data
from
OnionSproutsBot.database
import
Database
from
OnionSproutsBot.helpers
import
unpack_callback_data
session
=
requests_cache
.
CachedSession
(
'
cache.db
'
)
session
=
requests_cache
.
CachedSession
(
data
[
'
bot
'
][
'
cache_name
'
],
expire_after
=
timedelta
(
minutes
=
10
)
)
platforms
=
{
"
android-aarch64
"
:
"
Android 64-bit
"
,
Loading