Open ikkez opened 7 years ago
Interesting!
I would say that since offsetset
ignores the Cache instance (no ttl argument passed), then it makes sense that offsetget
ignores it too.
So I vote for updating the docs.
alright.. adding this to the docs sounds fine.
Another thing: cached variables are not accessable within the template by default. That's somehow logical, because the sandbox receives a copy of the current HIVE by default, and cached variables are lazy-loaded on demand, which is great...so if you have not accessed / requested this variable from cache before, it's not present in template and cannot be fetched from there... worth a note in the docs as well.
There's a different between
$f3->get('foo')
and$f3->foo
.https://github.com/bcosca/fatfree-core/blob/b2e66eb1f27c61187c9608cc994673f9e501ed2c/base.php#L2097-L2099
Since offsetget uses the
ref
method insteadget
, it does not check the Cache here. I'm not sure if that's an issue or maybe just something to note in the docs 🤔 Thoughts?