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
The Delay class is mainly for administration purposes, but may also be used as an alternative way to handle delays. It is generally not needed, but available usage examples are shown below.
41
41
```php
42
+
$pdo = new PDO('mysql:host=127.0.0.1;dbname=database', 'username', 'password');
42
43
$delayHandler = new \vipnytt\RobotsTxtParser\Delay($pdo);
Copy file name to clipboardExpand all lines: docs/sql/cache.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,16 @@ Multiple crawlers may with benefits share the same database.
9
9
### Requirements:
10
10
- MySQL
11
11
12
-
Support for additional databases is possible, just[submit an issue](https://github.com/VIPnytt/RobotsTxtParser/issues) and we'll see what we can do about it.
12
+
The library is built with cross-system in mind, and everything is set for additional database support. Just[submit an issue](https://github.com/VIPnytt/RobotsTxtParser/issues) and we'll see what we can do about it.
13
13
14
14
## Usage
15
15
```php
16
16
$handler = new RobotsTxtParser\Cache($pdo);
17
17
$client = $handler->client('http://example.com');
18
18
```
19
19
20
+
See the [Cache class documentation](../methods/Cache.md) for more information and additional available methods.
Copy file name to clipboardExpand all lines: docs/sql/delay.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,9 @@
1
1
# Delay handler
2
2
Many hosts requires you to control the robot's request flow, using a minimum interval between each request. The reasons for this isn't always obvious, and may sometimes be complicated.
3
3
4
+
Did you know this number is as high as about 40% of all `robots.txt` files?
5
+
_Source: internal statistics_
6
+
4
7
Examples of a 5 second interval:
5
8
-[`Crawl-delay: 5`](../directives.md#crawl-delay)
6
9
-[`Cache-delay: 5`](../directives.md#cache-delay)
@@ -12,9 +15,12 @@ Multiple _user-agents_ / _crawlers_ may share the same database. The delay is ha
12
15
### Requirements
13
16
- MySQL 5.6+
14
17
15
-
Support for additional databases is possible, just[submit an issue](https://github.com/VIPnytt/RobotsTxtParser/issues) and we'll see what we can do about it.
18
+
The library is built with cross-system in mind, and everything is set for additional database support. Just[submit an issue](https://github.com/VIPnytt/RobotsTxtParser/issues) and we'll see what we can do about it.
16
19
17
20
## Usage
21
+
- See the [DelayInterface](../methods/DelayInterface.md) for client usage
22
+
- See the [Delay class](../methods/Delay.md) for management
0 commit comments