Git Product home page Git Product logo

Comments (20)

nitriques avatar nitriques commented on August 16, 2024

I would question the whole architecture design you have. Why not create actuall pages for your urls ?

Please remember that this extension works on a per url basis. It means that there is only one cache entry (one html result) per actual url and Conditionalizer breaks that rule.

I would consider splitting your DS across multiple pages and fetch the data via ajax (?) or use Cacheable Datasource, but I do not know how well it plays with Conditionalizer.

I am closing the issue since it's not a bug and there are no way to get what you are hoping for with it.

from cachelite.

jdsimcoe avatar jdsimcoe commented on August 16, 2024

That's fine I just didn't know where to pose the question. Building the site under one Symphony page allows my client to easily create one-off pages via a Section without having to do any Symphony XSLT work. That being said there are multiple URLs but everything is essentially coming from one single page. It sounds like (and my testing has confirmed this) that Cachelite will not work well in this scenario.

from cachelite.

DavidOliver avatar DavidOliver commented on August 16, 2024

@nitriques, if different URLs are in use, shouldn't this extension be suitable, even if only one actual Symphony page is in use?

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

That being said there are multiple URLs but everything is essentially coming from one single page.

Sorry I miss that. The problem is, every time a single entry is created or updated, the cache needs to be flushed. I thjnk that Conditionalizer breaks that since what cachelite does is looking at which entries all datasources (that executed) returned in order to build the cache map (url -> entries relationship and url->section relationship). See

$this->_delete_page_references($this->_url);
$this->_save_page_references($this->_url, $this->_sections, $this->_entries);

if different URLs are in use, shouldn't this extension be suitable, even if only one actual Symphony page is in use?

Yes and not. If the same url always returns the same entries from the same sections (with the same DB state) than yes it should. (but would still feel hacky to me),

Also, it might be a good thing to point out that the actual cache key is a hash of the $_GET array, sorted by keys, (see

private function _updateFromGetValues() {
// Cache sorted $_GET;
$this->_get = $_GET;
ksort($this->_get);
// hash it to make sure it wont overflow 255 chars
$this->_url = $this->_hash($this->_get);
}
) so that how uniqueness comes from.

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

Just remebered that #19 as never been pulled.

I am reopening, since this may be why @jdsimcoe setup does not works.

from cachelite.

jdsimcoe avatar jdsimcoe commented on August 16, 2024

Still doesn't work 👎

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

:( leave the issue open than!!

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

Did you tried the latest integration branch https://github.com/symphonists/cachelite/tree/integration ?

from cachelite.

jdsimcoe avatar jdsimcoe commented on August 16, 2024

Yes I did. ?debug was also broken in that branch.

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

Yes I know about that. This sucks... Which version of Symphony are you using ?

from cachelite.

jdsimcoe avatar jdsimcoe commented on August 16, 2024

2.5.2-rc1

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

Can you update to 2.5.2 official (released 2 days ago) ?

from cachelite.

brendo avatar brendo commented on August 16, 2024

Why is debug broken? What happens?
On 7 Nov 2014 08:08, "Nicolas Brassard" [email protected] wrote:

Can you update to 2.5.2 official (released 2 days ago) ?


Reply to this email directly or view it on GitHub
#21 (comment)
.

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

@brendo See #22. I've meant to fix this a long time ago... Will do it tomorrow...

from cachelite.

jdsimcoe avatar jdsimcoe commented on August 16, 2024

@nitriques Tested on 2.5.2 release and still doesn't work on my single-page site.

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

Ok Thanks @jdsimcoe

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

Can you post two cachelite files + there corresponding url and hash please ?

from cachelite.

jdsimcoe avatar jdsimcoe commented on August 16, 2024

@nitriques What cachelite files do you want me to post?

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

Those in manifest/cache/ (the filename starts with cache_) Please give at least two with corresponding urls...

from cachelite.

nitriques avatar nitriques commented on August 16, 2024

All values from the $_GET superglobal are used to create the cache key. Maybe that's the problem. Closing for now.

from cachelite.

Related Issues (20)

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.