Giter Club home page Giter Club logo

uncache's Introduction

TYPO3 extension Uncache: Caches? What do you mean, caches...?

To install:

composer require --dev namelesscoder/uncache

What is it?

A cache preventer.

What does it do?

Prevents caching.

How does it work?

You know what a cache does? This doesn't do that.

Where does it work?

On TYPO3 7.6.0 and v8 series and most likely also up-coming v9.

Which cache types does it prevent?

Logic flowchart:

  1. Is it a cache?
  2. Then it is prevented!

Can it still allow some caches to work?

See the flowchart above.

How to use

Install; then forget that you ever had a clear all caches button which was always eight keystrokes and two mouse clicks away.

Have fun, enjoy!

uncache's People

Contributors

namelesscoder avatar xf- avatar coding46 avatar bucha avatar cedricziel avatar outdoorsman avatar vertexvaar avatar

Stargazers

Simon Schaufelberger avatar Maxime Lafontaine avatar  avatar

Watchers

James Cloos avatar

Forkers

thomashohn

uncache's Issues

wrong dependency

ext_emconf has

'depends' => array(
'core' => '',
),

but "core" doesnt' exists :)

Disable uncaching in install tool

I know the flowchart is strict about caches beeing active at any point of time, but something i often have to deal with is that compare database always wants to drop the cache tables beacuse there is no database backend configured and i often forget about that.

Would you, just to know before i provide a PR, allow a condition that disables the uncaching for install tool requests or do you want to keep it nice and clean?

[BUG/FEATURE] Merged assets aren't reloaded

When using Assets ViewHelper to merge all registered assets they are not reloaded when using Uncache extension.

This extension is designed to disable only native TYPO3 caches or should also cooperate with Assets ?

Add TYPO3 6.2 compatibility

Since https://git.typo3.org/Packages/TYPO3.CMS.git/commit/d7b922f4a2e5ab64459830cd021fc085c8c2de46 the usage of $GLOBALS['typo3CacheManager'] and $GLOBALS['typo3CacheFactory'] are deprecated. Deprecation message:

Usage of $GLOBALS['typo3CacheManager'] and $GLOBALS['typo3CacheFactory'] are deprecated since 6.2 will be removed in two versions. Use \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Cache\CacheManager') or dependency injection to access the singletons.'

On latest TYPO3 6.2 (git master) thus uncache throws the following exeption:

Fatal error: Uncaught exception 'TYPO3\CMS\Extbase\Reflection\Exception\PropertyNotAccessibleException' with message 'The property "cacheConfigurations" on the subject does not exist.


Following qick'n'dirty hack (caching is definitly too complex for me, so please review very intensely) seems to work with a minimal FluidTYPO3 (TYPO3 6.2, flux, fluidpages and fluidcontent). I had to add some conditions (extbase_datamapfactory_datamap, extbase_typo3dbbackend_tablecolumns and fluid_template) to get rid of exeptions a la

1203699034: A cache with identifier "extbase_datamapfactory_datamap" does not exist.

My replacement for line 16-24 in ext_localconf.php

if (isset($GLOBALS['typo3CacheManager']) === TRUE) {
    if (version_compare(TYPO3_branch, '6.2', '<')) {
        $configurations = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($GLOBALS['typo3CacheManager'], 'cacheConfigurations', TRUE);
        $caches = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($GLOBALS['typo3CacheManager'], 'caches', TRUE);
        $GLOBALS['typo3CacheManager'] = new \TYPO3\CMS\Uncache\Override\Core\Cache\CacheManager();
        $GLOBALS['typo3CacheManager']->setCacheConfigurations($configurations);
        \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($GLOBALS['typo3CacheManager'], 'caches', $caches, TRUE);
        \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager', $GLOBALS['typo3CacheManager']);
        unset($configurations, $caches);
    } else {
        $typo3CacheManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Cache\CacheManager');
        $configurations = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($typo3CacheManager, 'cacheConfigurations', TRUE);
        if (!isset($configurations['extbase_datamapfactory_datamap'])) {
            $configurations['extbase_datamapfactory_datamap'] = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($typo3CacheManager, 'defaultCacheConfiguration', TRUE);
        }
        if (!isset($configurations['extbase_typo3dbbackend_tablecolumns'])) {
            $configurations['extbase_typo3dbbackend_tablecolumns'] = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($typo3CacheManager, 'defaultCacheConfiguration', TRUE);
        }
        if (!isset($configurations['fluid_template'])) {
            $configurations['fluid_template'] = $configurations['cache_core'];
        }
        $caches = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($typo3CacheManager, 'caches', TRUE);
        $typo3CacheManager = new \TYPO3\CMS\Uncache\Override\Core\Cache\CacheManager();
        $typo3CacheManager->setCacheConfigurations($configurations);
        \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($typo3CacheManager, 'caches', $caches, TRUE);
        \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager', $typo3CacheManager);
        unset($configurations, $caches);
    }
}

Fatal Error in Install Tool if EXT:uncache active

Hi @NamelessCoder !
When EXT:uncache is active the 'Database analyzer' of Install Tool throws this error:

Detected Fatal Error
Call to a member function getBackend() on a non-object in /var/www/dummy.com/htdocs/typo3_src/typo3/sysext/core/Classes/Cache/Cache.php on line 95

In my workflow I use this tool pretty often while developing and I wonder if is easy to fix this without the need to disable/enable EXT:uncache.

Thanks anyway!

[BUG] Version 1.1.0 does not work with TYPO3. 6.1

Im getting this error with 6.1.7.
#1231259656: The cache configuration for cache "fluid_template" was not an array as expected. (More information)

InvalidArgumentException thrown in file
/var/www/clients/client1/web10/web/typo3_src-6.1.7/typo3/sysext/core/Classes/Cache/CacheManager.php in line 88.

Fatal error upon attempt to install uncache

I can't install this extension due to this fatal error:

Call to a member function getBackend() on a non-object in C:\xampp\www\dev3\htdocs\v15\typo3\sysext\core\Classes\Cache\Cache.php on line 105

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.