Files
filegator/configuration/tmpfs.html
2022-09-19 21:02:24 +02:00

77 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/highlight.dark.css">
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
<header class="navbar navbar-default navbar-fixed-top">
<a class="navbar-brand" href="/">
The title
<small class="hidden-xs hidden-sm">
This is the default subtitle!
</small>
</a>
</header>
<main class="container">
<div class="row">
<section id="content" class="col-sm-12">
<h2 id="temporary-file-system-service">Temporary file system service</h2>
<p>This service is responsible for managing temporary files. TMP files are created:</p>
<ul>
<li>When uploading files, chunks are stored in the TMP folder before merging and moving to the final storage destination</li>
<li>When creating and extracting archives (zip files)</li>
<li>When downloading multiple files, they are copied into TMP folder before zipping</li>
</ul>
<p>Tmp files are usually removed immediately after the use. For expired files, configurable garbage collection is used:</p>
<pre><code> 'Filegator\Services\Tmpfs\TmpfsInterface' =&gt; [
'handler' =&gt; '\Filegator\Services\Tmpfs\Adapters\Tmpfs',
'config' =&gt; [
'path' =&gt; __DIR__.'/private/tmp/',
'gc_probability_perc' =&gt; 10,
'gc_older_than' =&gt; 60 * 60 * 24 * 2, // 2 days
],
],</code></pre>
<p>Note: if you want to use this script as a stateless app or in any kind of multi-node environment, you must mount a single shared TMP folder for all the instances. You can solve this problem with <a href="https://aws.amazon.com/efs/">Amazon Elastic File System</a> or similar approach.</p>
</section>
</div>
</main>
<footer>
<div class="container">
<p class="text-muted">
website generated with <a href="http://couscous.io" title="Markdown website generator">Couscous</a>
</p>
</div>
</footer>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="//yastatic.net/highlightjs/8.2/highlight.min.js"></script>
<script>
$(function() {
$("section>h1").wrap('<div class="page-header" />');
// Syntax highlighting
hljs.initHighlightingOnLoad();
});
</script>
</body>
</html>