Thanks Daniel,
I'm embarassed to say that I don't know whether the files/folders are
hard or soft linked! How to tell?
I'm using a bit of software that does all that structure setup for me
and I have not delved in to see how it sets these folders up.
I'm remote desktop (VNC) to the linux box and viewing the images via
konqueror. So there should not be any http caching happening.
I've turned off caching in Konqueror also.
I'm trying to simplify what I'm doing to try to find out why this is
happening. But it seems that Joomla is picking up the cached copy when
an image is uploaded rather than the changed file.
If I start in a different area with a new file it works correctly. It's
only when an existing image is overwritten with the same name that the
old image shows up in Joomla but ALSO in Konqueror. Which makes me think
it's not Joomla but something in Linux underneath somewhere. Really bizarre!
Anyway still trying to home in on where things are going nuts.
Ben
On 1/07/2010 4:04 PM, Daniel Pittman wrote:
Ben Donohue<[email protected]> writes:
I really don't understand what is going on here...
I have a folder structure that is replicated several times by linking the
base folder
A hard-link, or a soft-link? I am guessing the later, since you can't
hard-link a directory, but it isn't entirely clear.
If you mean "cloned by hard-linking all the files" then the answer is rather
different to what I am about to give you.[1]
Some folders down within the master folder I have two files called 1.jpg (a
picture of a computer mouse), and 2.jpg (a picture of a computer)
When I look at the linked folders via konqueror and with thumbnails on, I see
the files correctly.
When I delete 1.jpg and then rename 2.jpg to 1.jpg, some folders show a
picture of the mouse, others show the picture of the computer.
What's going on here?
It could be that you are seeing a cache effect, where the system has a copy of
the file in either an HTTP cache (if you are accessing this via the web) or a
local icon cache.
Everything should be a picture of a computer. Why are the linked
folders/files not updating with the changes of the file name?
Assuming they are soft-linked directories, so the change actually happens to
the one single "real" directory, cache effects.
(browsing to the linux box via a windows computer show the correct computer
image in all the linked structure) I've turned off caching in konqueror.
Maybe it needs more of a kick to do the right thing?
The reason I'm asking is that I'm importing the images into a joomla site
and the images are now incorrect. I've traced it so far to the linking I
think...
Given your description, it sounds suspiciously like HTTP caching, but it is
hard to be sure. Does the access log for Joomla show that the image in being
downloaded by the client, not just a "not modified" response?
Does Joomla maintain an internal cache of, say, rescaled images that might
need to be flushed?
Daniel
Footnotes:
[1] Specifically, when you "delete" a file with hard links, you only remove
that one name associated with it. The other links are unaffected.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html