• Resolved ulafox

    (@xintv123)


    I know Memcached and Redis are object cache systems, but this plugin provides Object-cache.php docket cache drop-in I have never understood … OPC In my impression, opcache doesn’t seem to cache WordPress without installing other tools, then what this object is cache? Why can’t you coexist with Memcached?

    • This topic was modified 3 years, 2 months ago by ulafox.
    • This topic was modified 3 years, 2 months ago by ulafox.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi there,

    Thanks for your question.

    WordPress provides a drop-in file named object-cache.php in order to extend and modify its object cache functionality. It is a special file that place in the “wp-content” directory.

    The purpose of this drop-in file is to make WordPress Object Cache can be reusable, it calls persistent object caching. Without object-cache.php each time we load the page, it needs to redo all the same operations.

    Either you use Memcached and Redis WordPress plugins or Docket Cache, it requires object-cache.php files. It only can use one at a time. All code logic and functionality needs to place in there, that is why it can’t co-exists.

    Docket Cache do persistent object caching same like Redis and Memcached. That is only different it stores WordPress Object Cache as PHP files and uses OPcache to makes it closed as in-memory cache like Redis and Memcached. Without OPcache, it still can operate.

    This is an example what object it caches:

    [
        'timestamp' => 1606492052,
        'site_id' => 1,
        'group' => 'options',
        'key' => 'cron',
        'type' => 'string',
        'timeout' => 1607701652,
        'data' => [
            1606534363 => [
                'wp_version_check' => [
                    '40cd750bba9870f18aada2478b24840a' => [
                        'schedule' => 'twicedaily',
                        'args' => [],
                        'interval' => 43200,
                    ],
                ],
            ],
            'version' => 2,
        ],
    ]

    You can read more here:

    1. Caching In WordPress
    2. WP_Object_Cache
    3. Docket Cache Docs

    Thanks.

    Thread Starter ulafox

    (@xintv123)

    Thank you for your reply, I can probably understand the working principle of this object cache

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘hi, friends, I have a few questions.’ is closed to new replies.